<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML 圆角示例</title>
<style>
/* 使用 CSS 的 border-radius 属性来设置圆角 */
.rounded-box {
width: 200px;
height: 100px;
background-color: lightblue;
border-radius: 25px; /* 设置圆角半径为 25px */
text-align: center;
line-height: 100px;
font-size: 20px;
color: white;
}
</style>
</head>
<body>
<div class="rounded-box">这是一个圆角盒子</div>
</body>
</html>
border-radius
是 CSS 中用于设置元素圆角的属性。border-radius: 25px;
将其四个角设置为半径为 25px 的圆角。border-radius
的值,以实现不同的圆角效果。例如,设置 border-radius: 50%;
可以创建一个圆形的元素。上一篇:表格html
下一篇:html input radio
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站