是否可以将“text”(div class =“move”)固定为“点击我”并随着“点击我”(div id =“click”)的增长而上下移动?
在转换过程中,是否可以将元素的宽度“点击我”(div id =“click”)保持100%?
.first_div {
border: 1px solid #000;
}
.first_div p {
font: 30px arial, sans-serif;
line-height: 0.77em;
color: #222;
border: 1px solid #000;
}
@keyframes my-animation {
0% {
transform: scale(1);
}
50% {
transform: scale(1);
}
100% {
transform: scale(4,4);
}
}
#click {
animation: my-animation 5s linear forwards;
transform-origin: left;
border: 1px solid;
}
<div class="first_div">
<div class="move">
<p>dummy text dummy text dummy text dummy text dummy text<br>
dummy text dummy text dummy text dummy text dummy text</p>
</div>
<div id="click" href="#"><a href="#second_div">click on me</a></div>
<div class="move">
<p>dummy text dummy text dummy text dummy text dummy text<br>
dummy text dummy text dummy text dummy text dummy text</p>
</div>
</div>