胶囊按钮
创建于 2024-12-03 /
28
字体:
[默认]
[大]
[更大]
了解如何使用 CSS 创建胶囊按钮。
如何创建胶囊按钮
步骤 1) 添加 HTML:
实例
<button class="button">Pill Button</button>步骤 2) 添加 CSS:
使用 border-radius
属性为按钮添加圆角:
实例
.button {background-color: #ddd;
border: none;
color: black;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
margin: 4px 2px;
cursor: pointer;
border-radius: 16px;
} 亲自试一试 »
转到我们的 CSS 按钮教程,了解有关如何设置按钮样式的更多信息。
0 人点赞过