ウィンドウのサイズを変更したときにテキストが画像の外側に移動しないようにしたい。しかし、このコードでは、サイズを変更するときに上下にさまよっています。 私のテキストはアニメーションですが、それは問題ではありませんか?レスポンシブな画像の上にテキストをオーバーレイする方法 - それに応じて?
.line-1{
width: 24em;
margin: 0 auto;
border-right: 2px solid rgba(255,255,255,.75);
font-size: 2vw;
text-align: center;
white-space: nowrap;
overflow: hidden;
transform: translateY(-50%);
font-family: 'Bitter', serif;
color: rgba(255,255,255,.75);
text-shadow: 3px 3px \t #000000;}
/* Animation */
.anim-typewriter{
animation: typewriter 4s steps(44) 1s 1 normal both,
blinkTextCursor 500ms steps(44) infinite normal;
}
@keyframes typewriter{
from{width: 0;}
to{width: 11em;}
}
@keyframes blinkTextCursor{
from{border-right-color: rgba(255,255,255,.75);}
to{border-right-color: transparent;}
}
#image {
left: 0;
top: 0;
}
#text {
z-index: 200;
position: absolute;
left: 27%;
top: 25%;
}
<center>
<div>
<img id="image" src="service.png" alt="ZJ-Automobile Service Angebot"
height="60%" width="60%" />
<a href="zjservice.html"><p id="text" class="line-1 anim-typewriter">
Unser Serviceangebot</p></a>
</div>
</center>
多分間違ったHTMLですか?私は本当にここで何が間違っているかは分かりません。 また、私は初心者ですので、心に留めてください。 私は私の質問に違って尋ねました。
私が何を意味するかを参照してください?
の可能性のある重複した[特定の位置に対応する画像の上にテキストを作成する方法?](http://stackoverflow.com/questions/41170016/how-to-make-text-特定のポジションでイメージに反応します) –
@AndrewClodyよく質問してみましたが、最後の投稿の助けを借りても私の問題にはまったく興味がなかったので、人々はもっと助けてくれました。 –