CSS渐变之CSS3 gradient在Firefox3.6下的效果兼容使用

11 篇文章 0 订阅
9 篇文章 0 订阅


这是最近在公司做一个产品的官网遇到的。

这是谷歌显示效果。


这是兼容之后火狐的效果。


贴上代码:

  
<ul class="wifi-device">
    <li><img id="wifi-watch" src="img/mkl_watch.png" alt=""></li>
    <li><img id="wifi-iphone" src="img/mkl_iphone.png" alt=""></li>
    <li><img id="wifi-ipad" src="img/mkl_ipad.png" alt=""></li>
    <li><img id="wifi-mac" src="img/mkl_mac.png" alt=""></li>
    <li></li>
</ul>

.wifi-device{
    display: flex;
    align-items:flex-end;
    justify-content: space-around;
    position: relative;
}
.wifi-device li{
    padding-top: 110px;
}
.wifi-device li img{
    -webkit-box-reflect: below 5px -webkit-linear-gradient(transparent,transparent 60%,rgba(0,0,0,.2));
}
.wifi-device li:nth-child(4) img{
    -webkit-box-reflect: below -27px -webkit-linear-gradient(transparent,transparent 60%,rgba(0,0,0,.2));
}
/*兼容火狐倒影*/
.wifi-device li:after{
    position: absolute;
    opacity: 0.4;
    content: "";
    display: block;
    width: 100%;
    -moz-transform: scaleY(-1);
}
.wifi-device li:nth-child(1):after {
    background: -moz-element(#wifi-watch) no-repeat;
    height: 165px;
}
.wifi-device li:nth-child(2):after {
    background: -moz-element(#wifi-iphone) no-repeat;
    height: 325px;
}
.wifi-device li:nth-child(3):after {
    background: -moz-element(#wifi-ipad) no-repeat;
    height: 440px;
}
.wifi-device li:nth-child(4):after {
    background: -moz-element(#wifi-mac) no-repeat;
    height: 610px;
}
.wifi-device li:nth-child(5){
    position: absolute;
    height: 200px;
    width: 100%;
    top: 100%;
    padding: 0;
    background: -moz-linear-gradient(rgba(0,0,0,0),1%,rgba(0,0,0,1))
}
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

时间在飞飞

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值