应用旋转时,Firefox渲染效果不佳的框阴影

时间:2015-03-09 17:28:38

标签: css css3 firefox

我的Firefox渲染元素存在问题,应用了框阴影和旋转。 有没有解决这个问题?我尝试应用rotateZ()背面可见性,没有结果。

.button{
    backface-visibility: hidden;
    padding-left: 1em;
    padding-right: 1em;
    line-height: 2.5em;
    color: #FFF;
    cursor: pointer;
    min-width: 200px;
    text-align: center;
    text-decoration: none;
    transition: all 100ms ease-in-out 0s;
    background: #FFB600;
    display: inline-block;
    font-family: sans-serif;
    font-size: 1.2em;
    outline: 1px solid transparent;
    box-shadow: 0.1em 0.1em 0px #DC6900, 0.2em 0.2em 1px #A32020;
    transform:rotate(3deg);
    padding-left: 1.5em;
    padding-right: 1.5em;
    background-color: #DC6900;
}
<a class="button">I am fancy button</a>

Firefox渲染1

1 个答案:

答案 0 :(得分:0)

可以添加边框:

border: 1px solid #DC6900;

https://stackoverflow.com/a/9333891/1064270

.button{
    backface-visibility: hidden;
    padding-left: 1em;
    padding-right: 1em;
    line-height: 5.5em;
    color: #FFF;
    cursor: pointer;
    min-width: 400px;
    text-align: center;
    text-decoration: none;
    transition: all 100ms ease-in-out 0s;
    background: #FFB600;
    display: inline-block;
    font-family: sans-serif;
    font-size: 1.2em;
    outline: 1px solid transparent;
    box-shadow: 0.1em 0.1em 0px #DC6900, 0.2em 0.2em 1px #A32020;
    padding-left: 1.5em;
    transform:rotate(3deg);
    padding-right: 1.5em;
    background-color: #DC6900;
}

.with-border{border: 1px solid #DC6900;}
<a class="button">I am fancy button</a> 
<br/>
<br/>
<a class="button with-border">I have a border</a>