Laravel  
laravel
文档
数据库
架构
入门
php技术
    
Laravelphp
laravel / php / java / vue / mysql / linux / python / javascript / html / css / c++ / c#

html圆角

作者:屰兲洏垳&   发布日期:2025-04-20   浏览:73

<!DOCTYPE html>
<html>
<head>
    <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;
        }
    </style>
</head>
<body>

<div class="rounded-box">这是一个圆角盒子</div>

</body>
</html>

解释说明:

  • border-radius 是 CSS 中用于设置元素边框圆角的属性。
  • 在这个例子中,.rounded-box 类设置了宽度、高度和背景颜色,并使用 border-radius: 25px 来创建一个圆角效果。你可以根据需要调整 border-radius 的值,以改变圆角的大小。

上一篇:html sitemap

下一篇:html