运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> .btn { border: none; background-color: inherit; padding: 14px 28px; font-size: 16px; cursor: pointer; display: inline-block; } /* Green */ .success { color: green; } .success:hover { background-color: #04AA6D; color: white; } /* Blue */ .info { color: dodgerblue; } .info:hover { background: #2196F3; color: white; } /* Orange */ .warning { color: orange; } .warning:hover { background: #ff9800; color: white; } /* Red */ .danger { color: red; } .danger:hover { background: #f44336; color: white; } /* Gray */ .default { color: black; } .default:hover { background: #e7e7e7; } </style> </head> <body> <h2>Text Buttons</h2> <p>Text buttons with a specific background color on hover:</p> <button class="btn success">Success</button> <button class="btn info">Info</button> <button class="btn warning">Warning</button> <button class="btn danger">Danger</button> <button class="btn default">Default</button> </body> </html>