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

前端 未结 4 731
死守一世寂寞
死守一世寂寞 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:54

    As an alternate solution, there's a beautiful lined paper effect written using CSS available here.

    background-color: #fff; 
    background-image: 
    linear-gradient(90deg, transparent 79px, #abced4 79px, #abced4 81px, transparent 81px),
    linear-gradient(#eee .1em, transparent .1em);
    background-size: 100% 1.2em;
    

    Browser Support: The patterns themselves should work on Firefox 3.6+, Chrome, Safari 5.1, Opera 11.10+ and IE10+. However, implementation limitations might cause some of them to not be displayed correctly even on those browsers (for example at the time of writing, Gecko is quite buggy with radial gradients).

提交回复
热议问题