Computer >> 컴퓨터 >  >> 프로그램 작성 >> CSS

CSS로 빈 원을 만드는 방법은 무엇입니까?


CSS로 빈 원을 만들려면 코드는 다음과 같습니다. −

예시

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
   body {
      font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
      margin: 20px;
   }
   .circle {
      height: 25px;
      width: 25px;
      background-color: rgb(52, 15, 138);
      border-radius: 50%;
      display: inline-block;
   }
   div :nth-of-type(2n) {
      background-color: red;
   }
</style>
</head>
<body>
<h1>Round dots example</h1>
<div>
<span class="circle"></span>
<span class="circle"></span>
<span class="circle"></span>
<span class="circle"></span>
</div>
</body>
</html>

출력

위의 코드는 다음과 같은 출력을 생성합니다 -

CSS로 빈 원을 만드는 방법은 무엇입니까?