如何使用 CSS 為按鈕新增圓角?
如需為按鈕新增圓角,請使用 border-radius 屬性。
示例
您可以嘗試執行以下程式碼來新增圓角 −
<!DOCTYPE html> <html> <head> <style> .button { background-color: yellow; color: black; text-align: center; font-size: 15px; padding: 20px; border-radius: 15px; } </style> </head> <body> <h2>Result</h2> <p>Click below for result:</p> <button class = "button">Result</button> </body> </html>
廣告