CSS 塗りつぶした円を描くには?

ショコラ
ショコラ

CSS 塗りつぶした円を描くには?

border-radius を使って円を描いて、その中に background-color で色を塗ります。

もっさん先輩
もっさん先輩
<html>
<body>
<style>
.circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #d4212b;
  
  position: absolute;
  top: 100px;
  left: 100px;
}
</style>
<div class="circle"></div>
</body>
</html>

以上

Scroll to Top