首页
CSS
CSS 按钮
试用: 按钮填充
运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> .button { background-color: #04AA6D; /* Green */ border: none; color: white; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; cursor: pointer; } .button1 {padding: 10px 24px;} .button2 {padding: 12px 28px;} .button3 {padding: 14px 40px;} .button4 {padding: 32px 16px;} .button5 {padding: 16px;} </style> </head> <body> <h2>Button Padding</h2> <p>Change the padding of a button with the padding property:</p> <button class="button button1">10px 24px</button> <button class="button button2">12px 28px</button> <button class="button button3">14px 40px</button> <button class="button button4">32px 16px</button> <button class="button button5">16px</button> </body> </html>