简体   繁体   English

transition:rotate在Firefox中不起作用

[英]transition:rotate is not working in Firefox

This is my code and transform is working in chrome browser but in firefox it is not working. 这是我的代码,transform在chrome浏览器中有效,但在firefox中却无效。

.delete-white a:before {
    background: none repeat scroll 0 0 #FFFFFF;
    height: 15px;
    left: 6px;
    margin-top: -7px;
    width: 5px;
    -webkit-transform: rotate(45deg) scale(1); 
    -moz-transform: rotate(45deg) scale(1); 
    -o-transform: rotate(45deg) scale(1); 
    -ms-transform: rotate(45deg) scale(1); 
}
.delete-white a:after {
    background: none repeat scroll 0 0 #FFFFFF;
    height: 5px;
    left: 1px;
    margin-top: -2px;
    width: 15px;
    -webkit-transform: rotate(45deg) scale(1); 
    -moz-transform: rotate(45deg) scale(1); 
    -o-transform: rotate(45deg) scale(1); 
    -ms-transform: rotate(45deg) scale(1); 
}

Two notes 两点

  1. You need to have content to :before / :after pseudo elements 你需要有content:before / :after伪元素
  2. You have forgotten the unprefixed version: transform: rotate(45deg) scale(1); 您已经忘记了非前缀版本: transform: rotate(45deg) scale(1);

将此规则添加到元素:“ display:inline-block;”

You need to include the standard, non-prefixed version (ie transform: rotate(45deg) scale(1); ) as the final definition in your list of transforms. 您需要在转换列表中包含标准的非前缀版本(例如, transform: rotate(45deg) scale(1); )作为最终定义。 The -moz one is deprecated, as will/should be the other ones in time. -moz一个已被弃用,其他时间将会/应该被弃用。 See the MDN for reference . 有关参考,请参见MDN

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM