PAUL

利用BootStrap库写的HTML源码
<!doctype html> <html lang="en&q...
扫描右侧二维码阅读全文
25
2018/12

利用BootStrap库写的HTML源码

      <!doctype html>
     <html lang="en">
      <head>
      <title>在线测试平台</title>
      <!-- Required meta tags -->
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

      <!-- Bootstrap CSS -->
      <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
       </head>
       <body>
      
      <!-- 导航条 -->
       <nav class="navbar navbar-expand-sm navbar-dark bg-primary">
        <a class="navbar-brand" href="#">在线测试平台</a>
        <button class="navbar-toggler d-lg-none" type="button" data-toggle="collapse" data-target="#collapsibleNavId" aria-controls="collapsibleNavId"
            aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="collapsibleNavId">
            <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
                <li class="nav-item active">
                    <a class="nav-link" href="#">首页<span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">科目一</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">科目四</a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="dropdownId" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">其他</a>
                    <div class="dropdown-menu" aria-labelledby="dropdownId">
                        <a class="dropdown-item" href="#">Action 1</a>
                        <a class="dropdown-item" href="#">Action 2</a>
                    </div>
                </li>
            </ul>
            <form class="form-inline my-2 my-lg-0">
                <input class="form-control mr-sm-2" type="text" placeholder="Search">
                <button class="btn btn-outline-success my-2 my-sm-0" type="submit">搜索</button>
            </form>
        </div>
      </nav>

       <!-- 容器  -->
       <div class="container">
         <!-- 进度条 -->
         <div class="progress my-5">
            <div class="progress-bar progress-bar-striped progress-bar-animated bg-success" role="progressbar"
                style="width: 85%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">Description</div>
        </div>
        <!-- 答题区域 -->
        <div class="jumbotron">
            <h1 class="display-4">1 市值最高的公司?</h1>
            <hr class="my-2">
            <!-- 选项 -->
            <div class="form-check my-3">
                <label class="form-check-label">
                    <input type="radio" 
                        class="form-check-input" 
                        name="item"
                        value="A">
                <span class="badge badge-pill badge-primary mx-2">A</span>可口可乐
              </label>
            </div>
            <div class="form-check my-3">
                <label class="form-check-label">
                    <input type="radio" 
                    class="form-check-input" 
                    name="item"
                    value="A">
                    <span class="badge badge-pill badge-primary mx-2">B</span>Apple
                </label>
            </div>
            <div class="form-check my-3">
                <label class="form-check-label">
                    <input type="radio" 
                    class="form-check-input" 
                    name="item"
                    value="A">
                    <span class="badge badge-pill badge-primary mx-2">C</span>中国石油
                </label>
            </div>
            <div class="form-check my-3">
                <label class="form-check-label">
                    <input type="radio" 
                        class="form-check-input" 
                        name="item"
                        value="A">
                <span class="badge badge-pill badge-primary mx-2">D</span>Google
              </label>
            </div>
            
            <!-- 按钮 -->
            <div class="row">
                <!-- 列 -->
                <div class="col-lg-6 col-sm-12 mb-sm-3 mb-lg-0">
                    <button type="button" name="" id="" class="btn btn-danger btn-block">上一题
      </button>
                </div>
                <div class="col-lg-6 col-sm-12">
                    <button type="button" name="" id="" class="btn btn-success btn-block">下一题
       </button>
                </div>
            </div>

        </div>
     </div>
    
     <!-- Optional JavaScript -->
     <!-- jQuery first, then Popper.js, then Bootstrap JS -->
     <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
     <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
     <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
    </body>
    </html>
Last modification:September 21st, 2019 at 04:02 pm
如果觉得我的文章对您有用,请随意赞赏

Leave a Comment