我的 CSS 代码是:
.logo
{
width: 20px;
height: 20px;
display: inline-block !important;
-webkit-transition: -webkit-transform .8s ease-in-out;
-ms-transition: -ms-transform .8s ease-in-out;
transition: transform .8s ease-in-out;
}
.logo:hover
{
transform:rotate(360deg);
-ms-transform:rotate(360deg);
-webkit-transform:rotate(360deg);
}
而 html 是:
<a class="navbar-brand" href="#">
<img src="img/logo200x200.png" class="logo" />
Website
</a>
我是否可以让图像不仅在鼠标在图像上时旋转,而且在鼠标在文本上时也旋转?
最佳答案
关于html - css - 在悬停时在图像上做动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34485653/