search

Home  >  Q&A  >  body text

css3 怎么实现像书籍装订线的效果?

css 怎么实现像书籍装订线的效果?不用图片的纯css3实现

大家讲道理大家讲道理2782 days ago580

reply all(2)I'll reply

  • 迷茫

    迷茫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.

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 11:32:29

    The answer is the same as your jagged question
    Use css3linear-gradient

    reply
    0
  • Cancelreply