<div class="item"><div>
.item {
width: 200px;
height: 100px;
border-width: 5px;
margin-top: 10%;
// 线性渐变生成图片 背景图重复的方式
background: linear-gradient(90deg, #333 50%, transparent 50%) repeat-x;
// 背景图的大小
background-size: 10px 4px;
// 设置背景图的位置
background-opsition: 0 0;
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.