How to make one circle inside of another using CSS

后端 未结 13 2268
-上瘾入骨i
-上瘾入骨i 2020-12-30 03:54

I am trying to make one circle inside of another circle using css, but I am having an issue making it completely centered. I am close, but still not there. Any ideas?

<
13条回答
  •  萌比男神i
    2020-12-30 04:27

    If you want to use only one div to add circle inside circle, then use box-shadow.

    div {
      border-radius: 50%;
      box-shadow: 0px 0px 0px 10px red, 0px 0px 0px 20px green, 0px 0px 0px 30px yellow, 0px 0px 0px 40px pink;
      width: 100px;
      height:100px;
      margin: 3em;
    }

提交回复
热议问题