「CSS」border-radius プロパティで半径を全4角に設定する

2021年11月17日

書式
border-radius : 値(半径を全4角に設定)
border-radius は CSS の プロパティで、要素の境界の外側の角を丸めます。
1つの半径を設定すると円の角になり、2つの半径を設定すると楕円の角になります。

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<style>
.cft {
border-radius: 10px;
border: 2px solid #000;
background-color: skyblue;
width: 250px;
height: 45px;
}
</style>
<div class="cft">四角の角を丸くするサンプル</div>
<style> .cft { border-radius: 10px; border: 2px solid #000; background-color: skyblue; width: 250px; height: 45px; } </style> <div class="cft">四角の角を丸くするサンプル</div>
<style>
  .cft {
    border-radius: 10px;
    border: 2px solid #000;
    background-color: skyblue;
    width: 250px;
    height: 45px;
  }
</style>
<div class="cft">四角の角を丸くするサンプル</div>

 

CSS

Posted by arkgame