/* 使用 border-radius 属性来创建圆角效果 */
.rounded-corner {
width: 200px;
height: 100px;
background-color: #87CEEB;
border-radius: 25px; /* 圆角的半径为 25px */
}
/* 创建完全圆形的效果 */
.circle {
width: 100px;
height: 100px;
background-color: #FF6347;
border-radius: 50%; /* 将元素变成一个圆形 */
}
/* 不同方向的圆角 */
.different-corners {
width: 200px;
height: 100px;
background-color: #90EE90;
border-top-left-radius: 25px; /* 左上角 */
border-top-right-radius: 5px; /* 右上角 */
border-bottom-right-radius: 15px; /* 右下角 */
border-bottom-left-radius: 10px; /* 左下角 */
}
border-radius 是 CSS 中用于设置元素边框圆角的属性。border-radius 设置为 50%。border-top-left-radius、border-top-right-radius、border-bottom-right-radius 和 border-bottom-left-radius 来实现。上一篇:css 强制换行
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站