Make chainmail background theme

社会主义新天地 提交于 2019-12-13 16:06:44

问题


I'd like to make a chainmail like this:

I've tried using linear-gradient but it seems not to work

    background: linear-gradient(#0c0c0c, #222222)!important

I expect the output to be like on shown image from imgur. Will linear-gradient work?


回答1:


You can do this with radial-gradient

I used different colors so we can better see the result:

body {
  margin:0;
  height:100vh;
  background:
    radial-gradient(50% 100%,#000 35%,transparent 50%) 0   0  /10px 10px,
    radial-gradient(50% 100%,#000 35%,transparent 50%) 5px 5px/10px 10px,
    yellow;
}

You can easily adjust the different values to control the size:

body {
  margin:0;
  height:100vh;
  background:
    radial-gradient(50% 100%,#000 25%,transparent 50%) 0   0  /8px 8px,
    radial-gradient(50% 100%,#000 25%,transparent 50%) 4px 4px/8px 8px,
    yellow;
}


来源:https://stackoverflow.com/questions/56618196/make-chainmail-background-theme

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!