❮ 上一节:如何创建文本按钮
下一节:如何创建滚动返回顶部按钮 ❯
如何创建 - 圆形按钮
更新于 2024/8/21 11:08:00
了解如何使用 CSS 设置圆形按钮的样式。
2px
4px
8px
12px
50%
如何设计圆形按钮
步骤 1) 添加 HTML:
实例
步骤 2) 添加 CSS:
使用 border-radius 属性为按钮添加圆角:
实例
.button { background-color: #4CAF50; border: none; color: white;
padding: 20px; text-align: center;
text-decoration: none; display: inline-block; font-size: 16px;
margin: 4px 2px;}.button1 {border-radius: 2px;}.button2
{border-radius: 4px;}.button3 {border-radius: 8px;}.button4
{border-radius: 12px;}.button5 {border-radius: 50%;}
亲自试一试 »
转到我们的 CSS 按钮教程,了解有关如何设置按钮样式的更多信息。
❮ 上一节:如何创建文本按钮
下一节:如何创建滚动返回顶部按钮 ❯