欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

bootstrap插件的使用方法-創(chuàng)新互聯(lián)

這篇文章給大家分享的是有關(guān)bootstrap插件的使用方法的內(nèi)容。小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考。一起跟隨小編過來看看吧。

在成都網(wǎng)站設(shè)計(jì)、成都做網(wǎng)站過程中,需要針對客戶的行業(yè)特點(diǎn)、產(chǎn)品特性、目標(biāo)受眾和市場情況進(jìn)行定位分析,以確定網(wǎng)站的風(fēng)格、色彩、版式、交互等方面的設(shè)計(jì)方向。創(chuàng)新互聯(lián)還需要根據(jù)客戶的需求進(jìn)行功能模塊的開發(fā)和設(shè)計(jì),包括內(nèi)容管理、前臺展示、用戶權(quán)限管理、數(shù)據(jù)統(tǒng)計(jì)和安全保護(hù)等功能。

利用 Bootstrap 數(shù)據(jù) API(Bootstrap Data API),大部分的插件可以在不編寫任何代碼的情況下被觸發(fā)。

站點(diǎn)引用 Bootstrap 插件的方式有兩種:

單獨(dú)引用:使用 Bootstrap 的個(gè)別的 *.js 文件。一些插件和 CSS 組件依賴于其他插件。如果您單獨(dú)引用插件,請先確保弄清這些插件之間的依賴關(guān)系。

編譯(同時(shí))引用:使用 bootstrap.js 或壓縮版的 bootstrap.min.js。

不要嘗試同時(shí)引用這兩個(gè)文件,因?yàn)?bootstrap.js 和 bootstrap.min.js 都包含了所有的插件。

所有的插件依賴于 jQuery。所以必須在插件文件之前引用 jQuery。請?jiān)L問 bower.json 查看 Bootstrap 當(dāng)前支持的 jQuery 版本。

data 屬性

你可以僅僅通過data屬性API就能使用所有的Bootstrap插件,無需寫一行JavaScript代碼。這是Bootstrap中的一等API,也應(yīng)該是你的選方式。

話又說回來,在某些情況下可能需要將此功能關(guān)閉。因此,我們還提供了關(guān)閉data 屬性API 的方法,即解除以data-api為命名空間并綁定在文檔上的事件。就像下面這樣:

$(document).off('.data-api')

如需關(guān)閉一個(gè)特定的插件,只需要在 data-api 命名空間前加上該插件的名稱作為命名空間即可,如下所示:

$(document).off('.alert.data-api')

實(shí)例:模態(tài)框插件

<head>
	<meta charset="utf-8"> 
	<title>Bootstrap 實(shí)例 - 模態(tài)框(Modal)插件</title>
	<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
	<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
	<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<h3>創(chuàng)建模態(tài)框(Modal)</h3>
<!-- 按鈕觸發(fā)模態(tài)框 -->
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
	開始演示模態(tài)框
</button>
<!-- 模態(tài)框(Modal) -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h5 class="modal-title" id="myModalLabel">
					模態(tài)框(Modal)標(biāo)題
				</h5>
			</div>
			<div class="modal-body">
				在這里添加一些文本
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">關(guān)閉
				</button>
				<button type="button" class="btn btn-primary">
					提交更改
				</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>
</body>
</html>

感謝各位的閱讀!關(guān)于bootstrap插件的使用方法就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,讓大家可以學(xué)到更多知識。如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!

當(dāng)前題目:bootstrap插件的使用方法-創(chuàng)新互聯(lián)
網(wǎng)站網(wǎng)址:http://www.chinadenli.net/article12/gscgc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站制作網(wǎng)站收錄品牌網(wǎng)站設(shè)計(jì)軟件開發(fā)定制開發(fā)品牌網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站優(yōu)化排名