使用 CSS 建立帶邊框的連結按鈕
要建立帶邊框的連結按鈕,可以嘗試執行以下程式碼 −
示例
<!DOCTYPE html> <html> <head> <style> a:link, a:visited { background-color: white; color: black; border: 1px solid blue; padding: 30px 30px; text-align: center; text-decoration: none; display: inline-block; } a:hover, a:active { background-color: red; color: white; } </style> </head> <body> <a href = "demo.html" target = "_blank">Demo Link</a> </body> </html>
廣告