迷茫2017-04-17 11:32:29
{
width: 150px;
height: 150px;
margin: 20% auto;
background-color: white;
background-image: repeating-linear-gradient(to right, #aaa 5%, #eee 10%, #ccc 15%);
box-shadow: 5px 5px 2px #eee;
border-radius: 5px;
}
Effect:
repeating-linear-gradient(to right, #aaa 5%, #eee 10%, #ccc 15%);
The most important thing is this sentence, repeated linear gradient, the first parameter is to the right, the next three are the color gradient points and positions, for example #aaa 5% starts the gradient from 5%, and before 5% Pure #aaa color, the same for the next two, and then repeat this gradient.