css花纹背景

<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<title></title>
</head>
<style type="text/css">
.patterns {
width: 200px;
height: 200px;
float: left;
margin: 10px;
box-shadow: 0 1px 8px #666;
}

.pt1 {
background-size: 50px 50px;
background-color: #0ae;
background-image: -webkit-linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent);
background-image: linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent);
}

.pt2 {
background-size: 50px 50px;
background-color: #f90;
background-image: -webkit-linear-gradient(0deg, rgba(255, 255, 255, .2) 50%, transparent 50%, transparent);
background-image: linear-gradient(0deg, rgba(255, 255, 255, .2) 50%, transparent 50%, transparent);
}
.pt3{
background-size: 50px 50px;
background-color: red;
background-image: -webkit-linear-gradient(45deg ,rgba(255,255,255,.2) 50%,transparent 50%,transparent);
}
</style>

<body>
<div class="patterns pt1"></div>
<div class="patterns pt2"></div>
<div class="patterns pt3"></div>
<div class="patterns pt4"></div>
</body>

</html>

 

您可以点击查看:http://runjs.cn/detail/wbnuyq6p

posted @ 2018-03-16 10:55  我喜欢喝糖水  阅读(682)  评论(0编辑  收藏  举报
我喜欢喝糖水的博客友链:股票指标编程学习