background的水平条纹和斜向条纹

水平条纹:

<div id="div1"> </div>

linear-gradient属性

#div1{
width: 100px;
height: 100px;
background:linear-gradient(yellow 25%,red 25%);
background:linear-gradient(yellow 25%,red 50%);模糊条纹边界
background:linear-gradient(90deg , yellow 25%,red 50%);90度竖直条纹
background-size: 42.4264068px 42.4264068px ;
}

-----------------------------------------------------------------

repeating-linear-gradient属性

 

#div1{
width: 100px;
height: 100px;
background: repeating-linear-gradient(45deg , #fb3,#fb3 15px , #58a 0 , #58a 30px)
}

posted @ 2016-09-04 10:47  Mr.Kiven  阅读(541)  评论(0编辑  收藏  举报