为什么 firefox 拒绝转换元素?我该如何解决?
.config:before
{
content: 'test';
font: 25px/55px serif;
-webkit-transition: .6s -webkit-transform ease-in-out;
transition: .6s transform ease-in-out;
}
.config.active:before
{
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
<span class="config active"></span>
JSBin:http://jsbin.com/zipokubode/1/edit?html,css,output
注意:我运行的是最新的稳定 FF,因此前缀不是问题。
最佳答案
你需要更改伪造的布局竞赛:http://jsbin.com/xutesahiqe/1/edit?html,css,output
这里 display:inline-block;
应该没问题。
.config
{
cursor: pointer;
display:inline-block;
}
.config:before
{
font: 25px/55px serif;
display:inline-block;
content: 'test';
-webkit-transition: .6s -webkit-transform ease-in-out;
transition: .6s transform ease-in-out;
}
.config.active:before
{
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
<span class="config"></span>
关于css - Firefox 拒绝转换元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29699727/