CSS gradient checkerboard pattern

后端 未结 5 1984
夕颜
夕颜 2020-12-14 00:09

I want to create a checkerboard pattern using gradients. I\'ve found an example and modified it to my needs, however it only works with -moz prefix. When I remo

5条回答
  •  自闭症患者
    2020-12-14 00:47

    This was Chrome's implementation for when you opened an image with transparency for a while (though they later removed it in favor of just using a solid background).

    element {
        background-position: 0px 0px, 10px 10px;
        background-size: 20px 20px;
        background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee 100%),linear-gradient(45deg, #eee 25%, white 25%, white 75%, #eee 75%, #eee 100%);
    }
    

提交回复
热议问题