bootstrap4设置按钮的方法

发布时间:2020-08-21 11:44:36 作者:小新
来源:亿速云 阅读:193

这篇文章主要介绍bootstrap4设置按钮的方法,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

 bootstrap4设置按钮代码:<button type="button" class="btn">,Bootstrap 4 提供了不同样式的按钮,可通过class来选择不同样式的按钮。

bootstrap4设置按钮的方法

实例:

<!DOCTYPE html>
<html>
<head>
  <title>Bootstrap 实例</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
  <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js"></script>
  <script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
  <h3>按钮样式</h3>
  <button type="button" class="btn">基本按钮</button>
  <button type="button" class="btn btn-primary">主要按钮</button>
  <button type="button" class="btn btn-secondary">次要按钮</button>
  <button type="button" class="btn btn-success">成功</button>
  <button type="button" class="btn btn-info">信息</button>
  <button type="button" class="btn btn-warning">警告</button>
  <button type="button" class="btn btn-danger">危险</button>
  <button type="button" class="btn btn-dark">黑色</button>
  <button type="button" class="btn btn-light">浅色</button>
  <button type="button" class="btn btn-link">链接</button>      
</div>

</body>
</html>

按钮类可用于 <a>, <button>, 或 <input> 元素上。

以上是bootstrap4设置按钮的方法的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注亿速云行业资讯频道!

推荐阅读:
  1. bootstrap中设置按钮位置的方法
  2. bootstrap4设置下拉菜单

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

bootstrap4 strap ootstrap

上一篇:Python安装urllib2库的方法

下一篇:layui设置菜单权限的方法

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》