使用 CSS 创建垂直按钮组


你可以尝试运行以下代码来创建垂直按钮组

示例

在线演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         .mybtn .button {
            background-color: orange;
            border: 1px solid green;
            width: 120px;
            color: white;
            font-size: 14px;
            padding: 10px;
            text-align: center;
            text-decoration: none;
            display: block;
         }
      </style>
   </head>
   <body>
      <div class = "mybtn">
         <button class = "button">Result</button>
         <button class = "button">Result</button>
         <button class = "button">Result</button>
         <button class = "button">Result</button>
      </div>
   </body>
</html>

更新于:2020 年 6 月 24 日

1 千次以上浏览

开启你的 职业

通过完成课程取得认证

开始吧
广告
© . All rights reserved.