• Bootstrap -- 按钮样式与使用


    Bootstrap -- 按钮样式与使用

    1. 可用于<a>, <button>, 或 <input> 元素的按钮样式

    按钮样式使用:

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>My Test bootstrap</title>
        <link rel="stylesheet" href="./css/bootstrap.min.css"> 
        <script type="text/javascript" src="./js/bootstrap.min.js"></script>
    </head>
    <body>
        <button type="button" class="btn btn-primary">原始按钮</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>
    </body>
    </html>
    View Code

    实现效果:

    2. 各种大小按钮的样式

    按钮大小样式的使用:

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>My Test bootstrap</title>
        <link rel="stylesheet" href="./css/bootstrap.min.css"> 
        <script type="text/javascript" src="./js/bootstrap.min.js"></script>
    </head>
    <body>
      <button type="button" class="btn btn-success">默认大小的按钮</button>
      <button type="button" class="btn btn-success btn-lg">大的按钮</button>
      <button type="button" class="btn btn-success btn-sm">小的按钮</button>
      <button type="button" class="btn btn-success btn-xs">特别小的按钮</button>
    </body>
    </html>
    View Code

    实现效果:

    3. 按钮状态:激活状态(.active)、禁用状态(disabled)

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>My Test bootstrap</title>
        <link rel="stylesheet" href="./css/bootstrap.min.css"> 
        <script type="text/javascript" src="./js/bootstrap.min.js"></script>
    </head>
    <body>
      <button type="button" class="btn btn-success">默认按钮</button>
      <button type="button" class="btn btn-success active">激活状态按钮</button>
      <button type="button" class="btn btn-success disabled">禁用状态按钮</button>
    </body>
    </html>
    View Code

    实现效果:

    4. 按钮组:使用 .btn-group 可以创建按钮组

     使用按钮组:

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>My Test bootstrap</title>
        <link rel="stylesheet" href="./css/bootstrap.min.css"> 
        <script type="text/javascript" src="./js/bootstrap.min.js"></script>
    </head>
    <body>
        <div class="btn-group">
            <button type="button" class="btn btn-primary">小胡子</button>
            <button type="button" class="btn btn-primary">大胡子</button>
            <button type="button" class="btn btn-primary">小朋友</button>
        </div>
    </body>
    </html>
    View Code

    实现效果:

    5. 按钮自适应样式

    自适应样式使用:

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>My Test bootstrap</title>
        <link rel="stylesheet" href="./css/bootstrap.min.css"> 
        <script type="text/javascript" src="./js/bootstrap.min.js"></script>
    </head>
    <body>
        <div class="btn-group btn-group-justified">
            <a href="https://www.baidu.com" class="btn btn-primary">百度</a>
            <a href="https://www.taobao.com" class="btn btn-primary">淘宝</a>
            <a href="https://www.qq.com" class="btn btn-primary">腾讯</a>
        </div>
    </body>
    </html>
    View Code

    实现效果:

  • 相关阅读:
    15--k8s之安全认证
    14--k8s之StorageClass,ConfigMap,Secret
    13--基本存储、高级存储、存储配置
    10--k8s之数据持久化
    9--k8s之Endpoints、健康服务检查、高可用
    8--k8s之service和ingress详解
    7--k8s之Pod控制器详解
    6--k8s之Pod结构、配置、生命周期、调度
    索引原理和慢查询优化
    pymysql模块及sql注入
  • 原文地址:https://www.cnblogs.com/ChengWenHao/p/BootstrapPart4.html
Copyright © 2020-2023  润新知