一、先上效果图
二、一个盒子div
<div class="siFrame"></div>
三、css代码
.siFrame {
width: 200px;
height: 100px;
margin: auto;
background: linear-gradient(to left, #4980D9, #4980D9) left top no-repeat,
linear-gradient(to bottom, #4980D9, #4980D9) left top no-repeat,
linear-gradient(to left, #4980D9, #4980D9) right top no-repeat,
linear-gradient(to bottom, #4980D9, #4980D9) right top no-repeat,
linear-gradient(to left, #4980D9, #4980D9) left bottom no-repeat,
linear-gradient(to bottom, #4980D9, #4980D9) left bottom no-repeat,
linear-gradient(to left, #4980D9, #4980D9) right bottom no-repeat,
linear-gradient(to left, #4980D9, #4980D9) right bottom no-repeat;
background-size: 2px 15px, 15px 2px, 2px 15px, 15px 2px;
}
四、调颜色就是()里面、长度和粗度background-size里面的四个属性,选择自己需要的调