y.svg<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800" viewBox="0 0 40 15" height="300">
<foreignObject x="0" y="0" height="15" width="200">
<html xmlns="http://www.w3.org/1999/xhtml">
<style>
div {
color: white; /* 白文字 */
background: linear-gradient( to right,
red,
orange,
yellow,
green,
aqua,
blue,
purple,
red
) 0% center / 400% auto ; /* グラデーション */
padding: 0.1em 0.2em 0.1em 0.2em;
animation: rainbow 16s linear infinite;
animation-direction: reverse;
font-size: 14px;
font-weight: bold;
font-family: "Noto Sans Mono CJK JP Bold";
line-height: 1em;
width:100%;height:100%;
transform-origin: top left;
transform: scale(0.67, 1);
}
@keyframes rainbow {
to { background-position-x: 400%; }
}
</style>
<div>
ようこそ
</div>
</html>
</foreignObject>
</svg>