手记

css直接画方格

<style>
div{width: 200px;height: 200px;display: inline-block;}
.test1,.test2{background-image: linear-gradient(45deg,blue 25%,transparent 25%),linear-gradient(-45deg,blue 25%,transparent 25%),linear-gradient(45deg,transparent 75%,blue 75%),linear-gradient(-45deg,transparent 75%,blue 75%);}
.test2{
background-size: 20% 20%;
}    
</style>
<div class="test1"></div>    
<div class="test2"></div>

0人推荐
随时随地看视频
慕课网APP