欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

精彩的Bootstrap案例分享 重點(diǎn)在注釋!(選項(xiàng)卡、柵格布局)

 更新時(shí)間:2016年07月01日 14:43:26   作者:super_yang_android  
這篇文章主要為大家分享了一個(gè)精彩的Bootstrap案例,涉及到了選項(xiàng)卡、柵格布局,關(guān)鍵重點(diǎn)在注釋,感興趣的小伙伴們可以參考一下

今天學(xué)習(xí)了bootsap,收獲頗豐,這里分享一個(gè)小案例,具體的解釋都在代碼上,這樣比較直觀。
先看圖例

<!DOCTYPE html>
<html lang="zh-cn">
<head>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width,initial-scale=1.0">
 <title>Bootstrap選項(xiàng)卡</title>
 <!-- 引入Bootstrap的樣式表 -->
 <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
 <link rel="stylesheet" type="text/css" href="css/bootstrap-responsive.min.css">
 <link rel="stylesheet" type="text/css" href="css/base.css">
</head>
<body>
<!-- container 設(shè)置div的width為940px,且居中顯示 -->
<div class="container">
 <!-- hero-unit 設(shè)置焦點(diǎn)視圖單元 -->
 <div class="hero-unit">
 <h1>聯(lián)想控股</h1>
 <p class="banner"><img src="img/bg2.png"></p>
 <p><a class="btn" href="#">更多&raquo;</a></p>
 </div>
 <!-- 柵格布局 默認(rèn)為12格子,每個(gè)子div設(shè)為4個(gè)格子,即228px-->
 <div class="row">
 <div class="span4">
  <h2>公司專題</h2>
  <p>2012年12月2日,聯(lián)想之星創(chuàng)業(yè)大講堂在常州舉行,柳傳志就“創(chuàng)業(yè)一把手的成長”、“創(chuàng)業(yè)團(tuán)隊(duì)的建設(shè)”與創(chuàng)業(yè)者進(jìn)行分享。</p>
  <!-- btn 按鈕樣式 -->
  <p><a class="btn" href="#">了解更多&raquo;</a></p>
 </div>
 <div class="span4">
  <h1>特別關(guān)注</h1>
  <p>從靠“賣電腦”起家,到旗下集IT、房地產(chǎn)、消費(fèi)與現(xiàn)代服務(wù)、化工新材料、現(xiàn)代農(nóng)業(yè)五大核心資產(chǎn)運(yùn)營于一體,聯(lián)想控股正沖刺在2014年~2016年之間上市。</p>
  <p><a class="btn" href="#">更多&raquo;</a></p>
 </div>
 <div class="span4">
  <h1>我們的歷史</h1>
  <p><img src="img/bg1.png"></p>
  <p><a class="btn" href="#">更多&raquo;</a></p>
 </div>
 </div>
 <hr/>
 <footer>
 <p>&copy; Company 2013</p>
 </footer>
</div>


<!-- 引入Bootstrap的js文件 -->
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap-tab.js"></script>
</body>
</html>


<!-- 引入base.css文件 -->
/*焦點(diǎn)樣式圖*/
div.hero-unit {
 /*背景樣式,默認(rèn)為灰色的*/
 background: url(../img/bg.png) no-repeat; 
 width: 980px;
 height: 443px; 
 position: relative;
 /*默認(rèn)為60px*/
 padding: 0;
 /*默認(rèn)為30px*/
 margin: 0;
 border-color: gray;
}
div.hero-unit h1{
 /*隱藏標(biāo)題*/
 display: none;
}
/*廣告顯示在左下角*/
div.hero-unit .banner {
 position: absolute;
 bottom: 0;
 left:10px;
}
/*按鈕在右下角顯示*/
div.hero-unit .btn {
 position: absolute;
 bottom: 14px;
 right: 20px;
}

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論