JSFiddle - React, Tailwind, and code Playground
by losymear
HTML
<div class="outer">
<div>
<p>测试悬浮效果</p>
<p>悬浮1.5s后会放大1.5倍,移除后恢复</p>
</div>
<img src="http://i1.sinaimg.cn/dy/deco/2013/0329/logo/LOGO_1x.png" alt="">
</div>
CSS
div:{
margin-bottom: 20px;
}
div.outer{
margin-left: 30px;
}
img:{
transform: scale(1,1);
}
img:hover{
animation: scale 1000s;
}
@keyframes scale {
0.15% {transform: scale(1,1)}
0.17% {transform :scale(1.5,1.5)}
}