*-transform: rotate works in Firefox but not chrome

允我心安 提交于 2019-12-11 04:28:04

问题


CSS looks as follows:

.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); 
}

Hovering over a <span class="rotate"> will rotate the element in Firefox but not chrome.
Demo: http://jsfiddle.net/BuHGQ/ (hover over the arrow)

What can be done so that it works in Chrome?


回答1:


Try this:

.rotate { display: inline-block; }

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



来源:https://stackoverflow.com/questions/10644204/transform-rotate-works-in-firefox-but-not-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!