Correction status:qualified
Teacher's comments:
将Bootstrap正确的引入到html文档中+使用常见的组件,实现一个博客的首页布局
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>博客首页</title> <link rel="stylesheet" href="../dist/css/bootstrap.css"> <script src="jquery.js"></script> <script src="../dist/js/bootstrap.js"></script> </head> <body> <div class="container"> <nav class="navbar navbar-inverse" > <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <li class="active"><a href="#">首页 <span class="sr-only">(current)</span></a></li> <li><a href="#">博客</a></li> <li><a href="#">Javascript</a></li> <li><a href="#">PHP</a></li> <li><a href="#">友链</a></li> </ul> <form class="navbar-form navbar-left"> <div class="form-group"> <input type="text" class="form-control" placeholder="Search"> </div> <button type="submit" class="btn btn-default">搜索</button> </form> <ul class="nav navbar-nav navbar-right"> <li><a href="#">欢迎您:Admin</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">个人中心<span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#">我的博客</a></li> <li><a href="#">个人资料</a></li> <li role="separator" class="divider"></li> <li><a href="#">退出登录</a></li> </ul> </li> </ul> </div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav> </div> <div class="container"> <div class="row"> <div class="col-md-8"> <div class="jumbotron"> <h1>Hello, world!</h1> <p>...</p> <p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p> </div> </div> <div class="col-md-4"> <ul class="list-group"> <li class="list-group-item">每日一记</li> <li class="list-group-item">Javascript</li> <li class="list-group-item">Thinkphp</li> <li class="list-group-item">jQuery</li> <li class="list-group-item">Vue.js</li> </ul> </div> </div> </div> <div class="container"> </div> </body> </html>
点击 "运行实例" 按钮查看在线实例