* -transform:旋转,在Firefox而不是Chrome工作(*-transform: r

2019-10-16 17:16发布

CSS如下所示:

.rotate
{
    -webkit-transition: all .5s ease-in-out; 
    -moz-transition: all .5s ease-in-out; 
    -o-transition: all .5s ease-in-out; 
    -ms-transition: all .5s ease-in-out;
}
.rotate:hover
{
    -webkit-transform: rotate(90deg) scale(1); 
    -moz-transform: rotate(90deg) scale(1); 
    -o-transform: rotate(90deg) scale(1); 
    -ms-transform: rotate(90deg) scale(1); 
}

鼠标悬停在<span class="rotate">将旋转Firefox中的元素,但不铬。
演示: http://jsfiddle.net/BuHGQ/ (将鼠标悬停在箭头)

有什么可以做,这样它在Chrome浏览器?

Answer 1:

尝试这个:

.rotate { display: inline-block; }

http://jsfiddle.net/y7nfD/1/



文章来源: *-transform: rotate works in Firefox but not chrome