首頁  >  問答  >  主體

如何刪除 HTML 按鈕上的灰色“邊框”

我在 HTML 網頁上看到按鈕周圍有邊框。我正在嘗試將一個按鈕設為藍色和一個綠色,並將它們放在桌子上。程式碼如下:

<table align="center">
  <tr style=" font-family: verdana; font-size: 24px;">
    <th> Select your Region </th>
  </tr>
  <tr>
  </tr>
  <tr>
  </tr>
  <tr>
  </tr>
  <tr>
  </tr>
  <tr>
    <td align="center">
      <button>
            <a id="cust" type="button" 
            style=
            "background-color: #00824A;
              border: none;
              color: white;
              padding: 16px 55px;
              text-align: center;
              text-decoration: none;
              display: inline-block;
              font-size: 16px;
              margin: 4px 2px;
              transition-duration: 0.4s;
              cursor: pointer;
              font-weight: bold;
              font-family: verdana"
            href="URL">
            US
            </a>
            </button>
    </td>
  </tr>
  <tr>
  </tr>
  <tr>
  </tr>
  <tr>
  </tr>
  <tr>
  </tr>
  <tr>
    <td align="center">
      <button>
            <a id="cust" type="button" 
            style=
            "background-color: #0061D5;
              border: none;
              color: white;
              padding: 16px 55px;
              text-align: center;
              text-decoration: none;
              display: inline-block;
              font-size: 16px;
              margin: 4px 2px;
              transition-duration: 0.4s;
              cursor: pointer;
              font-weight: bold;
              font-family: verdana" 
            href="URL">
            EU
            </a>
            </button>
    </td>
  </tr>
</table>

這是它們在網頁上的顯示方式:

我希望整個按鈕都是那種顏色,周圍沒有灰色。我刪除了樣式中帶有 border: none 的「邊框」。相反,它在較大的灰色按鈕內顯示一個顏色矩形。

P粉986028039P粉986028039187 天前430

全部回覆(1)我來回復

  • P粉605233764
  • 取消回覆