W3.CSS具有非常漂亮且响应迅速的CSS,用于自定义按钮的外观。使用以下CSS:
序号 | 类名和描述 |
---|---|
1 | w3-btn 代表一个标准按钮。还可用于将链接设置为按钮样式。 |
2 | w3-btn-floating 表示一个圆形的浮动按钮。 |
3 | w3-btn-floating-large 表示一个大的浮动按钮。 |
例
w3css_buttons.htm
<html> <head> <title>The W3.CSS Forms</title> <meta name = "viewport" content = "width = device-width, initial-scale = 1"> <link rel = "stylesheet" href = "https://www.w3schools.com/lib/w3.css"> </head> <body class = "w3-container"> <h2>Standard Buttons</h2> <button class = "w3-btn">Click Me</button> <button class = "w3-btn w3-teal">Click Me</button> <button class = "w3-btn w3-disabled">I am disabled</button> <h2>Links as Buttons</h2> <a class = "w3-btn">Link</a> <a class = "w3-btn w3-teal">Link</a> <a class = "w3-btn w3-disabled">Disabled Link</a> <h2>Floating Buttons</h2> <a class = "w3-btn-floating">+</a> <a class = "w3-btn-floating w3-teal">+</a> <a class = "w3-btn-floating w3-disabled">+</a> <h2>Large Floating Buttons</h2> <a class = "w3-btn-floating-large">+</a> <a class = "w3-btn-floating-large w3-teal">+</a> <a class = "w3-btn-floating-large w3-disabled">+</a> </body> </html>
作者:terry,如若转载,请注明出处:https://www.web176.com/w3css/929.html