使用 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 千次以上瀏覽

開啟你的 職業

透過完成課程取得認證

開始吧
廣告