[HTML] — 按鈕 Button
按鈕
使用 <button> 可以製作一個按鈕。
<button>按鈕</button>
設定圓角
可以使用 css 的 border-radius 來調整按鈕的外型。
<button style="border-radius: 60px;">圓角按鈕</button>
增加連結
使用 <a> 包覆 <button> 可以使按鈕有超連結的功能。
這裡 <a> 有使用 「target=“_blank”」可以使點擊時,彈出新的視窗。
<a href="<https://www.google.com/>" target="_blank">
<button style="border-radius: 60px;">To Google</button>
</a>
完整程式碼
<button>按鈕</button>
<br><br><br>
<button style="border-radius: 60px;">圓角按鈕</button>
<br><br><br>
<a href="<https://www.google.com/>" target="_blank">
<button style="border-radius: 60px;">To Google</button>
</a>
參考資料
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button