div+css背景渐变色代码示例

2020-05-01 10:04:08易采站长站整理

这个示例代码就是上面是红色,下面是黑色,渐变色的。


<style type=”text/css”>
#round {
height: 200px;
width:100px;
margin:0px auto;
background-image: -moz-linear-gradient(top, #F00, #000);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #F00), color-stop(1,#000));
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=’#F00′, endColorstr=’#000′, GradientType=’0′);
}
</style>
<div id=”round”></div>

演示效果图