最为一个小白,对这种布局什么的还真是有点不知所措。只能粗略的把组件搬过来改改,以后还需多加学习。
实例
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css"> <script src="http://code.jquery.com/jquery-latest.js"></script> <script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <title>个人博客</title> <style> </style> </head> <body> <nav class="navbar navbar-default navbar-fixed-top"> <div class="container"> <!-- 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> <a class="navbar-brand" href="#">个人博客</a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <form class="navbar-form navbar-right"> <div class="form-group"> <input type="text" class="form-control" placeholder="搜索文章"> </div> <button type="submit" class="btn btn-default">搜索</button> </form> <ul class="nav navbar-nav navbar-right"> <li class="active"><a href="#">首页 <span class="sr-only">(current)</span></a></li> <li><a href="#">Php</a></li> <li><a href="#">Html</a></li> <li><a href="#">Css</a></li> <li><a href="#">Javascript</a></li> <li><a href="#">Bootstrap</a></li> </ul> </div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav> <!--轮播图--> <div class="carousel slide" id="carousel" data-ride="carousel"> <!--播放顺序--> <div class="container"> <ol class="carousel-indicators"> <li data-target="#carousel" data-slide-to="0" class="active"></li> <li data-target="#carousel" data-slide-to="1" ></li> <li data-target="#carousel" data-slide-to="2" ></li> </ol> <!--播放图片--> <div class="carousel-inner"> <div class="item active"> <img src="9.28/1.jpg" alt="" > </div> <div class="item "> <img src="9.28/2.jpg" alt="" > </div> <div class="item"> <img src="9.28/3.jpg" alt=""> </div> </div> <a class="left carousel-control" href="#carousel" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="right carousel-control" href="#carousel" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div> </div> <br> <div class="list-group"> <div class="container"> <a href="" class="list-group-item"> <div class="list-group-item-heading"> <h3>php从入门到精通</h3> </div> <div class="list-group-item-text">简介:PHP(外文名:PHP: Hypertext Preprocessor,中文名:“超文本预处理器”)是一种通用开源脚本语言。语法吸收了C语言、Java和Perl的特点,利于学习,使用广泛,主要适用于Web开发领域。PHP 独特的语法混合了C、Java、Perl以及PHP自创的语法。它可以比CGI或者Perl更快速地执行动态网页。</div> </a> <a href="" class="list-group-item"> <div class="list-group-item-heading"> <h3>php从入门到精通</h3> </div> <div class="list-group-item-text">简介:PHP(外文名:PHP: Hypertext Preprocessor,中文名:“超文本预处理器”)是一种通用开源脚本语言。语法吸收了C语言、Java和Perl的特点,利于学习,使用广泛,主要适用于Web开发领域。PHP 独特的语法混合了C、Java、Perl以及PHP自创的语法。它可以比CGI或者Perl更快速地执行动态网页。</div> </a> <a href="" class="list-group-item"> <div class="list-group-item-heading"> <h3>php从入门到精通</h3> </div> <div class="list-group-item-text">简介:PHP(外文名:PHP: Hypertext Preprocessor,中文名:“超文本预处理器”)是一种通用开源脚本语言。语法吸收了C语言、Java和Perl的特点,利于学习,使用广泛,主要适用于Web开发领域。PHP 独特的语法混合了C、Java、Perl以及PHP自创的语法。它可以比CGI或者Perl更快速地执行动态网页。</div> </a> </div> </div> <!--分页--> <div class="container text-center"> <nav aria-label="Page navigation"> <ul class="pagination"> <li> <a href="#" aria-label="Previous"> <span aria-hidden="true">«</span> </a> </li> <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> <li> <a href="#" aria-label="Next"> <span aria-hidden="true">»</span> </a> </li> </ul> </nav> </div> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例