Ich sehe einen Rahmen um die Schaltfläche auf der HTML-Seite. Ich versuche, einen Knopf blau und einen grün zu machen und sie auf einen Tisch zu legen. Der Code lautet wie folgt:
<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>
So erscheinen sie auf der Webseite:
Ich möchte, dass die gesamte Schaltfläche diese Farbe hat und kein Grau darum herum. Ich habe den „Rahmen“ mit border:none im Stil entfernt. Stattdessen wird ein farbiges Rechteck innerhalb einer größeren grauen Schaltfläche angezeigt.
边框是
设置按钮样式并删除默认边框button
元素本身,而不是其中的链接。您需要使用
相关阅读:https://css-tricks.com/overriding-default -按钮样式/