您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

为Bootstrap按钮添加尺寸

2024/4/18 2:27:26发布19次查看
为了在bootstrap中为按钮添加大小,可以尝试以下类:

描述
.btn-lg
这会使按钮变大。
.btn-sm
这会使按钮变小。
.btn-xs
这会使按钮变得特别小。
.btn-block
这会创建块级按钮,即占据父元素的整个宽度。
示例您可以尝试运行以下代码来创建一个小按钮 −
演示
<!doctype html><html> <head> <title>bootstrap example</title> <meta name = "viewport" content = "width = device-width, initial-scale = 1"> <link rel = "stylesheet" href = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"> <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> </head> <body> <button type = "button" class = "btn btn-default btn-sm"> small button </button> </body></html>
以上就是为bootstrap按钮添加尺寸的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product