欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

基于Bootstrap的网页设计实例

程序员文章站 2023-12-02 17:03:16
废话不多说了,直接给大家贴代码了,具体代码如下所示: <%@ page language="java" contenttype="text/html;...

废话不多说了,直接给大家贴代码了,具体代码如下所示:

<%@ page language="java" contenttype="text/html; charset=utf-8"
 pageencoding="utf-8"%>
<!doctype html >
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>首页菜单</title>
<link href="css/bootstrap.min.css" rel="external nofollow" rel="stylesheet">
<style type="text/css">
 body{
  padding-top: 50px;
  padding-bottom: 50px;
 }
 .carousel{/* 滚动图片样式 */
  height: 500px;
  background-color: #000;
  margin-bottom: 60px;
 }
 .carousel .item{
  height: 500px;
  background-color: #000;
 }
 .carousel img{
  width: 100%;
 }
 .carousel-caption p{
  margin-bottom:20px;
  font-size: 20px;
  line-height: 1.8;
 }
 #summary-container .col-md-4{
  text-align:center;/*居中对齐*/
 }
 hr.divder{
  margin:40px 0;
 }
 .feature{
  padding: 30px 0;
 }
 .feature-heading{
  font-size:50px;
  color:#2a6496;
  margin-top:120px;
 }
 .feature-heading .text-muted{
  font-size: 28px;
  color:#999;
 }
</style>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation">
 <div class="containe">
  <div class="navbar-header">
   <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#demo-navbar">
    <span class="sr-only">toggle navigation</span><!-- toggle navigation不能缺少 -->
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>   
   </button>
   <a class="navbar-brand" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >现代浏览器博物馆</a>
  </div> 
  <!-- 导航栏 -->
  <div class="collapse navbar-collapse" id="demo-navbar">
   <ul class="nav navbar-nav">
    <li class="active"><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >综述</a></li>   
    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >简述</a></li>   
    <li class="dropdown">
    <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="dropdown-toggle" data-toggle="dropdown">特点 <span class="caret"></span></a>
     <ul class="dropdown-menu" role="menu">
      <li><a href="#tab-chrome" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >chrome</a></li>
      <li><a href="#tab-firefox" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >firefox</a></li>
      <li><a href="#tab-safari" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >safari</a></li>
      <!-- <li class="divider"></li> //divider:分隔符 -->
      <li><a href="#tab-opera" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >opera</a></li>
      <li><a href="#tab-ie" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >ie9</a></li>
     </ul>
    </li>   
    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" data-toggle="modal" data-target="#about">关于</a></li>   
    <li>   
   </ul>
  </div>
 </div>
</nav>
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
 <ol class="carousel-indicators">
  <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
  <li data-target="#carousel-example-generic" data-slide-to="1"></li>
  <li data-target="#carousel-example-generic" data-slide-to="2"></li>
  <li data-target="#carousel-example-generic" data-slide-to="3"></li>
  <li data-target="#carousel-example-generic" data-slide-to="4"></li>
 </ol>
 <div class="carousel-inner" role="listbox">
  <div class="item active">
   <img src="images/chrome-big.jpg" alt="1 slide">
   <div class="carousel-caption">
    <h1>chrome</h1>
    <p>google chrome,又称google浏览器,是一个由google(谷歌)公司开发的网页浏览器</p>
    <p><a class="btn btn-lg btn-primary" href="http://www.google.cn/intl/zh-cn/chrome/browser/" role="button" target="_blank">点击下载</a></p>
   </div>
  </div>
  <div class="item">
   <img src="images/firefox-big.jpg" alt="2 slide" >
   <div class="carousel-caption">
    <h1>firefox</h1>
    <p>mozilla firefox,中文名通常称为“火狐”或者“火狐浏览器”,是一个开源的网页浏览器</p>
    <p><a class="btn btn-lg btn-primary" href="http://www.firefox.com.cn/download/" role="button" target="_blank">点击下载</a></p>
   </div>
  </div>
  <div class="item">
   <img src="images/safari-big.jpg" alt="3 slide" >
   <div class="carousel-caption">
    <h1>safari</h1>
    <p>safari,是苹果计算机的最新操作系统mas os x中的浏览器</p>
    <p><a class="btn btn-lg btn-primary" href="http://www.apple.com/cn/safari/" role="button" target="_blank">点击下载</a></p>
   </div>
  </div>
  <div class="item">
   <img src="images/opera-big.jpg" alt="4 slide" >
   <div class="carousel-caption">
    <h1>opera</h1>
    <p>opera浏览器,是一款挪威opera software asa公司制作的支持多页面标签式的网络浏览器</p>
    <p><a class="btn btn-lg btn-primary" href="http://www.opera.com/zh-cn" role="button" target="_blank">点击下载</a></p>
   </div>
  </div>
  <div class="item">
   <img src="images/ie-logo.jpg" alt="5 slide" >
   <div class="carousel-caption">
    <h1>ie</h1>
    <p>internet explorer,简称ie,是微软公司推出的一款网页浏览器</p>
    <p><a class="btn btn-lg btn-primary" href="http://www.microsoft.com/zh-cn/download/" role="button" target="_blank">点击下载</a></p>
   </div>
  </div>
 </div>
 <a class="left carousel-control" href="#carousel-example-generic" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="button" data-slide="prev">
  <span class="glyphicon glyphicon-chevron-left"></span>
  <span class="sr-only">上一页</span>
 </a>
 <a class="right carousel-control" href="#carousel-example-generic" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="button" data-slide="next">
  <span class="glyphicon glyphicon-chevron-right"></span>
  <span class="sr-only">下一页</span>
 </a>
</div>
<div class="container" id="summary-container">
 <div class="row">
  <div class="col-md-4">
  <img class="img-circle" src="images/chrome-logo-small.jpg" alt="chrome">
  <h2>chrome</h2>
  <p>google chrome,又称google浏览器,是一个由google(谷歌)公司开发的网页浏览器</p>
  <p><a class="btn btn-default" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="button">点击下载</a></p>
  </div>
  <div class="col-md-4">
  <img class="img-circle" src="images/firefox-logo-small.jpg" alt="chrome">
  <h2>firefox</h2>
  <p>mozilla firefox,中文名通常称为“火狐”或者“火狐浏览器”,是一个开源的网页浏览器</p>
  <p><a class="btn btn-default" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="button">点击下载</a></p>
  </div>
  <div class="col-md-4">
  <img class="img-circle" src="images/safari-logo-small.jpg" alt="chrome">
  <h2>safari</h2>
  <p>safari,是苹果计算机的最新操作系统mas os x中的浏览器</p>
  <p><a class="btn btn-default" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="button">点击下载</a></p>
  </div>
 </div>
 <hr class="divder">
 <ul class="nav nav-tabs" role="tablist" id="tab-list">
  <li class="active"><a href="#tab-chrome" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="tab" data-toggle="tab">chrome</a></li>
  <li><a href="#tab-firefox" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="tab" data-toggle="tab">firefox</a></li>
  <li><a href="#tab-safari" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="tab" data-toggle="tab">safari</a></li>
  <li><a href="#tab-opera" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="tab" data-toggle="tab">opera</a></li>
  <li><a href="#tab-ie" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="tab" data-toggle="tab">ie</a></li>
 </ul>
 <div class="tab-content">
  <div class="tab-pane active" id="tab-chrome">
   <div class="row feature">
   <div class="col-md-7">
    <h2 class="feature-heading">google chrome <span class="text-muted">使用最广泛的浏览器</span></h2>
    <p class="lead">google chrome,又称google浏览器,是一个由google(谷歌)公司开发的网页浏览器。
    该浏览器是基于其他开源软件撰写,包括webkit,目标是提升稳定性,速度和安全性,并创造出简单且有效率的使用这界面
    </p>
   </div>
   <div class="col-md-5">
    <img class="feature-image img-responsive" src="images/chrome-logo.jpg">
   </div>
  </div>
  </div>
  <div class="tab-pane" id="tab-firefox">
  <div class="row feature">
   <div class="col-md-7">
    <h2 class="feature-heading">mozilla firefox<span class="text-muted">燃烧的狐狸</span></h2>
    <p class="lead">mozilla firefox,中文名称为“火狐”或“火狐浏览器”,是一个开源网页浏览器,使用gecko引擎(非ie内核),支持多种操作系统如window、mac和linux。</p>
   </div>
   <div class="col-md-5">
    <img class="feature-image img-responsive" src="images/firefox-logo.jpg">
   </div>
  </div>
  </div>
  <div class="tab-pane" id="tab-safari">
  <div class="row feature">
   <div class="col-md-7">
    <h2 class="feature-heading">safari<span class="text-muted">mac用户首先</span></h2>
    <p class="lead">safari,是苹果计算机的最新操作系统mac os x中的浏览器,使用了kde的khtml作为浏览器的运算核心。safari在2003年1月7日首度发行测试版,并成为mac os x v10.3与之后的默认浏览器,也是iphone与tpad和ipod touch的指定浏览器。</p>
   </div>
   <div class="col-md-5">
    <img class="feature-image img-responsive" src="images/safari-logo.jpg">
   </div>
  </div>
  </div>
  <div class="tab-pane" id="tab-opera">
  <div class="row feature">
   <div class="col-md-5">
    <img class="feature-image img-responsive" src="images/opera-logo.jpg">
   </div>
   <div class="col-md-7">
    <h2 class="feature-heading">opera<span class="text-muted">小众但易用</span></h2>
    <p class="lead">opera浏览器,是一款挪威opera software asa公司制作的支持多也页面标签式浏览的网络浏览器。是跨平台浏览器可以在windowns,mac和linux三个操作系统平台上运行。</p>
   </div>
  </div>
  </div>
  <div class="tab-pane" id="tab-ie">
  <div class="row feature">
   <div class="col-md-5">
    <img class="feature-image img-responsive" src="images/ie-logo.jpg">
   </div>
   <div class="col-md-7">
    <h2 class="feature-heading">ie<span class="text-muted">老招牌</span></h2>
    <p class="lead">internet explorer,原称microsoft internet explorer(7,8,9,10版本),简称ie,是美国微软公司推出的一款网页浏览器。它采用的排版引擎(内核)为trident</p>
   </div>
  </div>
  </div>
 </div>
 <hr class="divider">
 <footer>
  <p class="pull-right"><a href="#top" rel="external nofollow" rel="external nofollow" >回到顶部</a></p>
  <div id="time"></div>
 </footer>
</div>
<!-- 弹框 -->
<div class="modal fade" id="about">
 <div class="modal-dialog">
  <div class="modal-content">
   <div class="modal-header"><!-- 头部 -->
    <button type="button" class="close" data-dismiss="modal">
    <span aria-hidden="true">×</span>
    <span class="sr-only">close</span>
    </button>
    <h4 class="modal-title">关于</h4>
   </div>
   <div class="modal-body"><!-- 内容 -->
   <p>网站基于bootstrap开发;设计风格简单清爽!内容是关于当今主流浏览器介绍,并附有下载资源。</p>
   </div>
   <div class="modal-footer"><!-- 底部 -->
    <button type="button" class="btn btn-default" data-dismiss="modal">了解</button>
    <!-- <button type="button" class="btn btn-primary">save changes</button> -->
   </div>
  </div>
 </div>
</div>
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
<script>  
document.getelementbyid('time').innerhtml=new date().tolocalestring();  
setinterval("document.getelementbyid('time').innerhtml=new date().tolocalestring();",1000);
$(document).ready(function(){
 $("#demo-navbar .dropdown-menu a").click(function(){
  var href=$(this).attr("href");
  $("#tab-list a[href='"+href+"']").tab("show");
 });
});
</script> 
</html>

导航及下拉菜单制作

<nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation">
 <div class="containe">
  <div class="navbar-header">
   <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#demo-navbar">
    <span class="sr-only">toggle navigation</span><!-- toggle navigation不能缺少 -->
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>   
   </button>
   <a class="navbar-brand" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >现代浏览器博物馆</a>
  </div> 
  <!-- 导航栏 -->
  <div class="collapse navbar-collapse" id="demo-navbar">
   <ul class="nav navbar-nav">
    <li class="active"><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >综述</a></li>   
    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >简述</a></li>   
    <li class="dropdown">
    <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="dropdown-toggle" data-toggle="dropdown">特点 <span class="caret"></span></a>
     <ul class="dropdown-menu" role="menu">
      <li><a href="#tab-chrome" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >chrome</a></li>
      <li><a href="#tab-firefox" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >firefox</a></li>
      <li><a href="#tab-safari" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >safari</a></li>
      <!-- <li class="divider"></li> //divider:分隔符 -->
      <li><a href="#tab-opera" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >opera</a></li>
      <li><a href="#tab-ie" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >ie9</a></li>
     </ul>
    </li>   
    <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" data-toggle="modal" data-target="#about">关于</a></li>   
    <li>   
   </ul>
  </div>
 </div>
</nav>

滚动图片广告

<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
 <ol class="carousel-indicators">
  <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
  <li data-target="#carousel-example-generic" data-slide-to="1"></li>
  <li data-target="#carousel-example-generic" data-slide-to="2"></li>
  <li data-target="#carousel-example-generic" data-slide-to="3"></li>
  <li data-target="#carousel-example-generic" data-slide-to="4"></li>
 </ol>
 <div class="carousel-inner" role="listbox">
  <div class="item active">
   <img src="images/chrome-big.jpg" alt="1 slide">
   <div class="carousel-caption">
    <h1>chrome</h1>
    <p>google chrome,又称google浏览器,是一个由google(谷歌)公司开发的网页浏览器</p>
    <p><a class="btn btn-lg btn-primary" href="http://www.google.cn/intl/zh-cn/chrome/browser/" role="button" target="_blank">点击下载</a></p>
   </div>
  </div>
  <div class="item">
   <img src="images/firefox-big.jpg" alt="2 slide" >
   <div class="carousel-caption">
    <h1>firefox</h1>
    <p>mozilla firefox,中文名通常称为“火狐”或者“火狐浏览器”,是一个开源的网页浏览器</p>
    <p><a class="btn btn-lg btn-primary" href="http://www.firefox.com.cn/download/" role="button" target="_blank">点击下载</a></p>
   </div>
  </div>
  <div class="item">
   <img src="images/safari-big.jpg" alt="3 slide" >
   <div class="carousel-caption">
    <h1>safari</h1>
    <p>safari,是苹果计算机的最新操作系统mas os x中的浏览器</p>
    <p><a class="btn btn-lg btn-primary" href="http://www.apple.com/cn/safari/" role="button" target="_blank">点击下载</a></p>
   </div>
  </div>
  <div class="item">
   <img src="images/opera-big.jpg" alt="4 slide" >
   <div class="carousel-caption">
    <h1>opera</h1>
    <p>opera浏览器,是一款挪威opera software asa公司制作的支持多页面标签式的网络浏览器</p>
    <p><a class="btn btn-lg btn-primary" href="http://www.opera.com/zh-cn" role="button" target="_blank">点击下载</a></p>
   </div>
  </div>
  <div class="item">
   <img src="images/ie-logo.jpg" alt="5 slide" >
   <div class="carousel-caption">
    <h1>ie</h1>
    <p>internet explorer,简称ie,是微软公司推出的一款网页浏览器</p>
    <p><a class="btn btn-lg btn-primary" href="http://www.microsoft.com/zh-cn/download/" role="button" target="_blank">点击下载</a></p>
   </div>
  </div>
 </div>
 <a class="left carousel-control" href="#carousel-example-generic" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="button" data-slide="prev">
  <span class="glyphicon glyphicon-chevron-left"></span>
  <span class="sr-only">上一页</span>
 </a>
 <a class="right carousel-control" href="#carousel-example-generic" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="button" data-slide="next">
  <span class="glyphicon glyphicon-chevron-right"></span>
  <span class="sr-only">下一页</span>
 </a>
</div>

栅格布局

<div class="row">
 <div class="col-md-4">
 <img class="img-circle" src="images/chrome-logo-small.jpg" alt="chrome">
 <h2>chrome</h2>
 <p>google chrome,又称google浏览器,是一个由google(谷歌)公司开发的网页浏览器</p>
 <p><a class="btn btn-default" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="button">点击下载</a></p>
 </div>
 <div class="col-md-4">
 <img class="img-circle" src="images/firefox-logo-small.jpg" alt="chrome">
 <h2>firefox</h2>
 <p>mozilla firefox,中文名通常称为“火狐”或者“火狐浏览器”,是一个开源的网页浏览器</p>
 <p><a class="btn btn-default" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="button">点击下载</a></p>
 </div>
 <div class="col-md-4">
 <img class="img-circle" src="images/safari-logo-small.jpg" alt="chrome">
 <h2>safari</h2>
 <p>safari,是苹果计算机的最新操作系统mas os x中的浏览器</p>
 <p><a class="btn btn-default" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" role="button">点击下载</a></p>
 </div>
 </div>

标签页

<div class="tab-content">
  <div class="tab-pane active" id="tab-chrome">
   <div class="row feature">
   <div class="col-md-7">
    <h2 class="feature-heading">google chrome <span class="text-muted">使用最广泛的浏览器</span></h2>
    <p class="lead">google chrome,又称google浏览器,是一个由google(谷歌)公司开发的网页浏览器。
    该浏览器是基于其他开源软件撰写,包括webkit,目标是提升稳定性,速度和安全性,并创造出简单且有效率的使用这界面
    </p>
   </div>
   <div class="col-md-5">
    <img class="feature-image img-responsive" src="images/chrome-logo.jpg">
   </div>
  </div>
  </div>
  
  <div class="tab-pane" id="tab-firefox">
  <div class="row feature">
   <div class="col-md-7">
    <h2 class="feature-heading">mozilla firefox<span class="text-muted">燃烧的狐狸</span></h2>
    <p class="lead">mozilla firefox,中文名称为“火狐”或“火狐浏览器”,是一个开源网页浏览器,使用gecko引擎(非ie内核),支持多种操作系统如window、mac和linux。</p>
   </div>
   <div class="col-md-5">
    <img class="feature-image img-responsive" src="images/firefox-logo.jpg">
   </div>
  </div>
  </div>
  
  <div class="tab-pane" id="tab-safari">
  <div class="row feature">
   <div class="col-md-7">
    <h2 class="feature-heading">safari<span class="text-muted">mac用户首先</span></h2>
    <p class="lead">safari,是苹果计算机的最新操作系统mac os x中的浏览器,使用了kde的khtml作为浏览器的运算核心。safari在2003年1月7日首度发行测试版,并成为mac os x v10.3与之后的默认浏览器,也是iphone与tpad和ipod touch的指定浏览器。</p>
   </div>
   <div class="col-md-5">
    <img class="feature-image img-responsive" src="images/safari-logo.jpg">
   </div>
  </div>
  </div>
  
  <div class="tab-pane" id="tab-opera">
  <div class="row feature">
   <div class="col-md-5">
    <img class="feature-image img-responsive" src="images/opera-logo.jpg">
   </div>
   <div class="col-md-7">
    <h2 class="feature-heading">opera<span class="text-muted">小众但易用</span></h2>
    <p class="lead">opera浏览器,是一款挪威opera software asa公司制作的支持多也页面标签式浏览的网络浏览器。是跨平台浏览器可以在windowns,mac和linux三个操作系统平台上运行。</p>
   </div>
  </div>
  </div>
  
  <div class="tab-pane" id="tab-ie">
  <div class="row feature">
   <div class="col-md-5">
    <img class="feature-image img-responsive" src="images/ie-logo.jpg">
   </div>
   <div class="col-md-7">
    <h2 class="feature-heading">ie<span class="text-muted">老招牌</span></h2>
    <p class="lead">internet explorer,原称microsoft internet explorer(7,8,9,10版本),简称ie,是美国微软公司推出的一款网页浏览器。它采用的排版引擎(内核)为trident</p>
   </div>
  </div>
  </div>
 </div>

弹出框制作

<div class="modal fade" id="about">
 <div class="modal-dialog">
  <div class="modal-content">
  
   <div class="modal-header"><!-- 头部 -->
    <button type="button" class="close" data-dismiss="modal">
    <span aria-hidden="true">×</span>
    <span class="sr-only">close</span>
    </button>
    <h4 class="modal-title">关于</h4>
   </div>
   
   <div class="modal-body"><!-- 内容 -->
   <p>网站基于bootstrap开发;设计风格简单清爽!内容是关于当今主流浏览器介绍,并附有下载资源。</p>
   </div>
   
   <div class="modal-footer"><!-- 底部 -->
    <button type="button" class="btn btn-default" data-dismiss="modal">了解</button>
    <!-- <button type="button" class="btn btn-primary">save changes</button> -->
   </div>
   
  </div>
 </div>
</div>

底部设计

  <footer>
 <p class="pull-right"><a href="#top" rel="external nofollow" rel="external nofollow" >回到顶部</a></p>
 <div id="time"></div>
   <footer>

js脚本

<script>   
document.getelementbyid('time').innerhtml=new date().tolocalestring();   
setinterval("document.getelementbyid('time').innerhtml=new date().tolocalestring();",1000);
$(document).ready(function(){
  $("#demo-navbar .dropdown-menu a").click(function(){
    var href=$(this).attr("href");

    $("#tab-list a[href='"+href+"']").tab("show");
  });
});
</script>
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation">
  <div class="containe">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#demo-navbar">
        <span class="sr-only">toggle navigation</span><!-- toggle navigation不能缺少 -->
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>      
      </button>
      <a class="navbar-brand" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >现代浏览器博物馆</a>
    </div> 
    <!-- 导航栏 -->
    <div class="collapse navbar-collapse" id="demo-navbar">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >综述</a></li>      
        <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >简述</a></li>      
        <li class="dropdown">
        <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="dropdown-toggle" data-toggle="dropdown">特点 <span class="caret"></span></a>
          <ul class="dropdown-menu" role="menu">
            <li><a href="#tab-chrome" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >chrome</a></li>
            <li><a href="#tab-firefox" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >firefox</a></li>
            <li><a href="#tab-safari" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >safari</a></li>
            <!-- <li class="divider"></li> //divider:分隔符 -->
            <li><a href="#tab-opera" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >opera</a></li>
            <li><a href="#tab-ie" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >ie9</a></li>
          </ul>
        </li>      
        <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" data-toggle="modal" data-target="#about">关于</a></li>      
        <li>      
      </ul>
    </div>
  </div>
</nav>

以上所述是小编给大家介绍的基于bootstrap的网页设计实例,希望对大家有所帮助