css - Firefox 拒绝转换元素

标签 css firefox transition

为什么 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/

相关文章:

css - 有没有一种方法可以将内容对齐,使其恰好一个显示在另一个下方?

ios - 应该显式调用 willMoveToParentViewController :(UIViewController *)parent & didMoveToParentViewController:(UIViewController *)parent?

system - 基于不变生成约束的方法

css - 其他 IDE 的 CSS-X 之类的插件

javascript - 在 Firefox 上有选择地禁用指定引用的 javascript 文件

firefox - 如何更改Firebug的字体?

CSS:非绝对元素中的过渡+缩放

javascript - 将模块移动到/all/modules 后,Nice Menus drupal 模块无法在 Firefox 中运行

css - 在 div 中将文本排到图像顶部

jquery - 如何使用 jQuery 更改多个元素的字体大小