プロパティ | 値 | 備考 |
---|---|---|
border-radius: | [ 《length【長さ】》 | 《percentage【パーセンテージ】》 ] {1,4} [ / [ 《length【長さ】》 | 《percentage【パーセンテージ】》 ] {1,4} ] ?/ より前:水平方向の径 / より後:垂直方向の径 / 以降を省略:両方の径 (1) 1個指定 (すべての角) (2) 2個指定 (左上と右下の角・右上と左下の角) (3) 3個指定 (左上の角・右上と左下の角・右下の角) (4) 4個指定 (左上の角・右上の角・右下の角・左下の角) | |
border-top-left-radius: border-top-right-radius: border-bottom-right-radius: border-bottom-left-radius: | [ 《length【長さ】》 | 《percentage【パーセンテージ】》 ] {1,2} (1) 1個指定 (角の径) (2) 2個指定 (水平方向の径・垂直方向の径) | 左上の角 右上の角 右下の角 左下の角 |
<style>
.example { border:5px blue solid }
</style>
<span class="example" style="border-radius:10px;">border-radius: 10px</span>
<span class="example" style="border-radius:10px 20px;">border-radius: 10px 20px</span>
<span class="example" style="border-radius:10px 20px 30px;">border-radius: 10px 20px 30px</span>
<span class="example" style="border-radius:10px 20px 30px 40px;">border-radius: 10px 20px 30px 40px</span>
<span class="example" style="border-radius:50%;">border-radius: 50%</span>
border-radius: 10px border-radius: 10px 20px border-radius: 10px 20px 30px border-radius: 10px 20px 30px 40px border-radius: 50%