国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

Bootstrap媒體對象學習使用

2019-11-19 17:16:45
字體:
來源:轉載
供稿:網友

Bootstrap媒體對象的學習使用,供大家參考,具體內容如下

基本結構:

<div class="media">  <a class="pull-left" 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" >    <img class="media-object" src="bg.jpg" alt="媒體對象">  </a>  <div class="media-body">    <h4 class="media-heading">媒體標題</h4>    這是一些示例文本。這是一些示例文本。    這是一些示例文本。這是一些示例文本。   </div></div>
<ul class="media-list">  <li class="media">    <a class="pull-left" 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" >      <img class="media-object" src="bg.jpg" alt="通用的占位符圖像">    </a>    <div class="media-body">      <h4 class="media-heading">媒體標題</h4>      <p>這是一些示例文本。這是一些示例文本。        這是一些示例文本。這是一些示例文本。        這是一些示例文本。這是一些示例文本。        這是一些示例文本。這是一些示例文本。</p>    </div>  </li>  <li class="media">    <a class="pull-right" 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" >      <img class="media-object" src=bg.jpg" alt="通用的占位符圖像">    </a>    <div class="media-body">      <h4 class="media-heading">媒體標題</h4>      這是一些示例文本。這是一些示例文本。      這是一些示例文本。這是一些示例文本。    </div>  </li></ul>

媒體對象輕量標記、易于擴展的特性是通過向簡單的標記應用 class 來實現的。

在 HTML 標簽中添加以下兩種形式來設置媒體對象:

(1).media:該 class 允許將媒體對象里的多媒體(圖像、視頻、音頻)浮動到內容區塊的左邊或者右邊。
(2).media-list:如果你需要一個列表,各項內容是無序列表的一部分,可以使用該 class。可用于評論列表與文章列表。

嵌套的媒體對象:

<ul class="media-list">  <li class="media">    <a class="pull-left" 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" >      <img class="media-object" src="bg.jpg"         alt="通用的占位符圖像">    </a>    <div class="media-body">      <h4 class="media-heading">媒體標題</h4>      <p>這是一些示例文本。這是一些示例文本。        這是一些示例文本。這是一些示例文本。        這是一些示例文本。這是一些示例文本。        這是一些示例文本。這是一些示例文本。        這是一些示例文本。這是一些示例文本。</p>      <!-- 嵌套的媒體對象 -->      <div class="media">        <a class="pull-left" 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" >          <img class="media-object" src="bg.jpg"             alt="通用的占位符圖像">        </a>        <div class="media-body">          <h4 class="media-heading">嵌套的媒體標題</h4>          這是一些示例文本。這是一些示例文本。          這是一些示例文本。這是一些示例文本。          <!-- 嵌套的媒體對象 -->          <div class="media">            <a class="pull-left" 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" >              <img class="media-object" src="bg.jpg"                 alt="通用的占位符圖像">            </a>            <div class="media-body">              <h4 class="media-heading">嵌套的媒體標題</h4>              這是一些示例文本。這是一些示例文本。              這是一些示例文本。這是一些示例文本。                           </div>          </div>        </div>      </div>      <!-- 嵌套的媒體對象 -->      <div class="media">        <a class="pull-left" 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" >          <img class="media-object" src="bg.jpg"             alt="通用的占位符圖像">        </a>        <div class="media-body">          <h4 class="media-heading">嵌套的媒體標題</h4>          這是一些示例文本。這是一些示例文本。          這是一些示例文本。這是一些示例文本。        </div>      </div>    </div>  </li>  <li class="media">    <a class="pull-right" 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" >      <img class="media-object" src="bg.jpg"         alt="通用的占位符圖像">    </a>    <div class="media-body">      <h4 class="media-heading">媒體標題</h4>      這是一些示例文本。這是一些示例文本。      這是一些示例文本。這是一些示例文本。           </div>  </li></ul>

效果圖:

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持武林網。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 新泰市| 义乌市| 广饶县| 保靖县| 新安县| 石狮市| 格尔木市| 道孚县| 德令哈市| 乌拉特前旗| 曲水县| 通渭县| 舞阳县| 马龙县| 湄潭县| 大宁县| 张家川| 和静县| 金山区| 修文县| 高安市| 迭部县| 缙云县| 重庆市| 牙克石市| 施甸县| 青神县| 崇义县| 龙里县| 灵武市| 永新县| 班戈县| 汉川市| 仙游县| 漠河县| 托克托县| 当雄县| 六枝特区| 西宁市| 甘洛县| 中牟县|