HTML5學習_day13(3)--border-radius屬性(圓角邊框)
阿新 • • 發佈:2019-02-09
border-radius屬性
<div style="width:50px;height:50px;background:red;border-radius:10px"></div>
用法:
border-radius:畫素;
複合寫法:
1.
左上角 右上角 右下角 左下角
border-radius:20px;
2.
左上角=右下角=20px;
右上角=左下角=40px;
border-radius:20px 40px;
3.
左上20 右上30 右下40
border-radius:20px 30px 40px;
4.
30表示水平方向的半徑 40表示垂直方向的半徑
5.border-radius: 30px/40px;
下面順時針方向設定水平半徑和垂直半徑
border-radius: 10px 20px 30px 40px/50px 60px 70px 80px;
單獨寫法:
左上角:border-top-left-radius: ;
右上角:border-top-right-radius: ;
左下角:border-bottom-left-radius: ;
右下角:border-bottom-right-radius: ;