Firefox CSS错误(在Chrome中正常工作)

时间:2015-10-16 19:01:23

标签: html css firefox

我遇到了一个问题,以下代码在Chrome中运行良好,但在Firefox中却没有。

<div id="client-controls">
<p style="margin-left: -90px;"><b>DHCP (?)</b></p>
<input type="checkbox" name="uncheckdhcp" id="uncheckdhcp" onclick="return uncheckdhcp();" checked/>
#client-controls html {
    background-color: #e4ded4;
    background-image: -webkit-linear-gradient(hsla(0,0%,0%,.1), hsla(0,0%,100%,.1));
    box-shadow: inset 0 0 100px hsla(0,0%,0%,.1);
    height: 100%;
}
#client-controls input[type="checkbox"] {
    background-image: -webkit-linear-gradient(hsla(0,0%,0%,.1), hsla(0,0%,100%,.1)),
                      -webkit-linear-gradient(left, #f66 50%, #088A08 50%);
    background-size: 100% 100%, 200% 100%;
    #background-position: 0 0, 15px 0;
    border-radius: 25px;
    box-shadow: inset 0 1px 4px hsla(0,0%,0%,.5),
                inset 0 0 10px hsla(0,0%,0%,.5),
                0 0 0 1px hsla(0,0%,0%,.1),
                0 -1px 2px 2px hsla(0,0%,0%,.25),
                0 2px 2px 2px hsla(0,0%,100%,.75);
    cursor: pointer;
    height: 30px;
    left: 0%;
    #margin: -12px -37px;
    padding-right: 0px;
    #position: left;
    top: 50%;
    margin-top: -20%;
    margin-left: -100px;
    width: 80px;
    -webkit-appearance: none;
    -webkit-transition: .25s;
align:left;
float:left;
}
#client-controls input[type="checkbox"]:after {
    background-color: #eee;
    background-image: -webkit-linear-gradient(hsla(0,0%,100%,.1), hsla(0,0%,0%,.1));
    border-radius: 25px;
    box-shadow: inset 0 1px 1px 1px hsla(0,0%,100%,1),
                inset 0 -1px 1px 1px hsla(0,0%,0%,.25),
                0 1px 3px 1px hsla(0,0%,0%,.5),
                0 0 2px hsla(0,0%,0%,.25);
    content: '';
    display: block;
    height: 100%;
    left: 0;
    #position: relative;
    top: 0;
    width: 25px;
}
#client-controls input[type="checkbox"]:checked {
    background-position: 0 0, 80px 0;
    padding-left: 50px;
    text-align: left;
    content-align: left;
    padding-right: 0;
}

请有人让我知道我哪里出错了,也许还有什么需要改变?

PS:此代码用于滑动切换按钮,它以chrome显示,FF仅显示带阴影背景的复选框。 三江源。

1 个答案:

答案 0 :(得分:0)

您是否尝试在-webkit前缀添加-moz前缀?