背景色渐变(兼容各浏览器)

本文详细介绍了如何使用CSS设置渐变背景效果,包括不同浏览器下的兼容性处理方法。通过实际代码示例,展示了从简单的两色渐变到复杂的多色渐变的实现过程。

.content
{
width:100%;
height:600px;
background: #179aac;
background: -moz-linear-gradient(top, #179aac 0%, #19bea0 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#179aac), color-stop(100%,#19bea0));
background: -webkit-linear-gradient(top, #179aac 0%,#19bea0 100%);
background: -o-linear-gradient(top, #179aac 0%,#19bea0 100%);
background: -ms-linear-gradient(top, #179aac 0%,#19bea0 100%);
background: linear-gradient(to bottom, #179aac 0%,#19bea0 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#179aac', endColorstr='#19bea0',GradientType=0 );
}
:root .content{filter:none;}

转载于:https://www.cnblogs.com/hyql/p/5063254.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值