How to draw multiple horizontal lines (Notebook Paper effect) using css?

前端 未结 4 748
死守一世寂寞
死守一世寂寞 2021-01-03 14:04

I am trying to make a notebook paper on my blog, and i wanted to make horizontal lines in it. I was successfully able to draw one horizontal line using css, but i am unable

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-03 14:46

    Using your way you have to insert multiple of these elements. You can't simply repeat them.

    Another - and I guess more suitable way - would be using a background image that you repeat horizontally and vertically to achieve this effect.

    body {
        background: transparent url(path/filename) repeat 0 0;
    }
    

    Or, if you can use gradients, nikhita dkslfslg's answer (+1 for that) might help.

提交回复
热议问题