Login
网站首页 > 文章中心 > 其它

css3背景颜色渐变属性_css背景图片渐变色怎么设置

作者:小编 更新时间:2023-07-23 16:15:57 浏览量:164人看过

如果只要求兼容高级浏览器,CSS3可以解决。

.box{width:500px;height:100px;background-image: -moz-linear-gradient(top , #45B5DA, #0382AD);background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, from(#45B5DA), to(#0382AD));background-image: -o-linear-gradient(top , #45B5DA, #0382AD);}如果要兼容低级浏览器,例如凯答瞎IE6,还是用背景图片重复吧。举数

上面的这属性可以盯空在CSS手册里查到。

background: #000000;

background: -moz-linear-gradient(top, #000000 0%, #ffffff 100%);

background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#000000), color-stop(100%,#ffffff));

background: -webkit-linear-gradient(top, #000000 0%,#ffffff 100%);

background: -o-linear-gradient(top, #000000 0%,#ffffff 100%);

background: -ms-linear-gradient(top, #000000 0%,#ffffff 100%);

background: linear-gradient(to bottom, #000000 0%,#ffffff 100%);

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000'橡知, endColorstr='缺燃#ffffff',GradientType=0 );

使用css3可以做。伏如虚

以上就是土嘎嘎小编大虾米为大家整理的css3背景颜色渐变属性_css背景图片渐变色怎么设置相关主题介绍,如果您觉得小编更新的文章对您有所帮助,不要忘记讲本站分享给您身边的朋友哦!!

版权声明:倡导尊重与保护知识产权。未经许可,任何人不得复制、转载、或以其他方式使用本站《原创》内容,违者将追究其法律责任。本站文章内容,部分图片来源于网络,如有侵权,请联系我们修改或者删除处理。

编辑推荐

热门文章