Bootstrap媒體對象學(xué)習(xí)使用
Bootstrap媒體對象的學(xué)習(xí)使用,供大家參考,具體內(nèi)容如下
基本結(jié)構(gòu):
<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">媒體標(biāo)題</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">媒體標(biāo)題</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">媒體標(biāo)題</h4>
這是一些示例文本。這是一些示例文本。
這是一些示例文本。這是一些示例文本。
</div>
</li>
</ul>
媒體對象輕量標(biāo)記、易于擴(kuò)展的特性是通過向簡單的標(biāo)記應(yīng)用 class 來實(shí)現(xiàn)的。
在 HTML 標(biāo)簽中添加以下兩種形式來設(shè)置媒體對象:
(1).media:該 class 允許將媒體對象里的多媒體(圖像、視頻、音頻)浮動到內(nèi)容區(qū)塊的左邊或者右邊。
(2).media-list:如果你需要一個(gè)列表,各項(xiàng)內(nèi)容是無序列表的一部分,可以使用該 class??捎糜谠u論列表與文章列表。
嵌套的媒體對象:
<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">媒體標(biāo)題</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">嵌套的媒體標(biāo)題</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">嵌套的媒體標(biāo)題</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">嵌套的媒體標(biāo)題</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">媒體標(biāo)題</h4>
這是一些示例文本。這是一些示例文本。
這是一些示例文本。這是一些示例文本。
</div>
</li>
</ul>
效果圖:

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
基于element?UI?input組件自行封裝“數(shù)字區(qū)間”輸入框組件的問題及解決
這篇文章主要介紹了基于element?UI?input組件自行封裝“數(shù)字區(qū)間”輸入框組件,實(shí)現(xiàn)代碼可以分為兩塊一塊為組件的封裝代碼,一塊為文中實(shí)現(xiàn)效果的演示代碼,對element?UI數(shù)字區(qū)間輸入組件相關(guān)知識感興趣的朋友一起看看吧2022-05-05
document.body.scrollTop 值總為0的解決方法 比較常見的標(biāo)準(zhǔn)問題
頁面具有 DTD(或者說指定了 DOCTYPE)時(shí),使用 document.documentElement。2009-11-11
JavaScript電子時(shí)鐘倒計(jì)時(shí)
這篇文章主要介紹了JavaScript電子時(shí)鐘倒計(jì)時(shí)的實(shí)現(xiàn)代碼,具有一定的參考價(jià)值,感興趣的朋友可以參考一下2016-01-01
JS中國標(biāo)準(zhǔn)時(shí)間轉(zhuǎn)化為年月日時(shí)分秒'yyyy-MM-dd hh:mm:ss'的示例詳解
這篇文章主要介紹了JS中國標(biāo)準(zhǔn)時(shí)間轉(zhuǎn)化為年月日時(shí)分秒‘yyyy-MM-dd hh:mm:ss‘的相關(guān)知識,通過示例代碼介紹了,Js各種時(shí)間轉(zhuǎn)換問題(YYYY-MM-DD 時(shí)間戳 中國標(biāo)準(zhǔn)時(shí)間),需要的朋友可以參考下2024-02-02
js驗(yàn)證電話號碼與手機(jī)支持+86的正則表達(dá)式
本篇文章主要介紹了js驗(yàn)證電話號碼與手機(jī)支持+86的正則表達(dá)式。需要的朋友可以過來參考下,希望對大家有所幫助2014-01-01
JavaScript簡單實(shí)現(xiàn)網(wǎng)頁回到頂部功能
JavaScript簡單實(shí)現(xiàn)網(wǎng)頁回到頂部功能,大家可以參考一下2013-11-11
微信小程序?qū)崿F(xiàn)錨點(diǎn)定位功能的方法實(shí)例
“錨點(diǎn)”功能在實(shí)際應(yīng)用設(shè)計(jì)的好,可以提高用戶體驗(yàn),這篇文章主要給大家介紹了關(guān)于微信小程序?qū)崿F(xiàn)錨點(diǎn)定位功能的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),需要的朋友可以參考下2021-07-07

