Bootstrap 3 按鈕標(biāo)簽實例代碼
本文給大家介紹按鈕標(biāo)簽的實例代碼,具體內(nèi)容如下:
通過將按鈕類添加到 <a>, <button>, <input> 來實現(xiàn)按鈕樣式
<a class="btn btn-default" href="#" rel="external nofollow" role="button">Link</a> <button class="btn btn-default" type="submit">Button</button> <input class="btn btn-default" type="button" value="Input"> <input class="btn btn-default" type="submit" value="Submit">
僅僅 <button> 適用于導(dǎo)航條以及導(dǎo)航條控件
如果 <a> 被作為按鈕使用而不是鏈接, 請注意添加 role="button"
高度推薦使用 <button>
選項
<!-- Standard button --> <button type="button" class="btn btn-default">Default</button> <!-- Provides extra visual weight and identifies the primary action in a set of buttons --> <button type="button" class="btn btn-primary">Primary</button> <!-- Indicates a successful or positive action --> <button type="button" class="btn btn-success">Success</button> <!-- Contextual button for informational alert messages --> <button type="button" class="btn btn-info">Info</button> <!-- Indicates caution should be taken with this action --> <button type="button" class="btn btn-warning">Warning</button> <!-- Indicates a dangerous or potentially negative action --> <button type="button" class="btn btn-danger">Danger</button> <!-- Deemphasize a button by making it look like a link while maintaining button behavior --> <button type="button" class="btn btn-link">Link</button>
尺寸
通過添加 .btn-lg , .btn-sm , .btn-xs 來實現(xiàn)尺寸
<p> <button type="button" class="btn btn-primary btn-lg">Large button</button> <button type="button" class="btn btn-default btn-lg">Large button</button> </p> <p> <button type="button" class="btn btn-primary">Default button</button> <button type="button" class="btn btn-default">Default button</button> </p> <p> <button type="button" class="btn btn-primary btn-sm">Small button</button> <button type="button" class="btn btn-default btn-sm">Small button</button> </p> <p> <button type="button" class="btn btn-primary btn-xs">Extra small button</button> <button type="button" class="btn btn-default btn-xs">Extra small button</button> </p>
通過添加 .btn-block 來實現(xiàn)塊級按鈕
<button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button> <button type="button" class="btn btn-default btn-lg btn-block">Block level button</button>
激活狀態(tài)
<button type="button" class="btn btn-primary btn-lg active">Primary button</button> <button type="button" class="btn btn-default btn-lg active">Button</button>
禁用狀態(tài)
IE9以下無法兼容
<button type="button" class="btn btn-lg btn-primary" disabled="disabled">Primary button</button> <button type="button" class="btn btn-default btn-lg" disabled="disabled">Button</button>
以上所述是小編給大家介紹的Bootstrap 3 按鈕標(biāo)簽實例代碼,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
相關(guān)文章
JavaScript提取元素中第一個子元素的實現(xiàn)方法
本文主要介紹了JavaScript提取元素中第一個子元素的實現(xiàn)方法,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2023-06-06基于JS實現(xiàn)簡單的3D立方體自動旋轉(zhuǎn)
這篇文章主要為大家詳細(xì)介紹了如何利用JavaScript實現(xiàn)簡單的3D立方體自動旋轉(zhuǎn)的效果,文中的實現(xiàn)代碼講解詳細(xì),感興趣的可以嘗試一下2022-06-06js如何將多個json結(jié)構(gòu)組成的字符串轉(zhuǎn)換為數(shù)組?
接口返回的EventStream結(jié)構(gòu)的數(shù)據(jù),由于http流式傳輸時,可能會分段,所以導(dǎo)致本該每次返回一段json數(shù)據(jù)結(jié)構(gòu)的字符串,變成了多個json數(shù)據(jù)結(jié)構(gòu)的字符串拼接在了一起,本文講述js如何將多個json結(jié)構(gòu)組成的字符串轉(zhuǎn)換為數(shù)組2024-08-08基于JavaScript中字符串的match與replace方法(詳解)
下面小編就為大家介紹一下JavaScript中的字符串的match與replace方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2017-12-12Openlayers+EasyUI Tree動態(tài)實現(xiàn)圖層控制
這篇文章主要為大家詳細(xì)介紹了Openlayers+EasyUI Tree動態(tài)實現(xiàn)圖層控制,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下2020-09-09js在數(shù)組中刪除重復(fù)的元素自保留一個(兩種實現(xiàn)思路)
遍歷要刪除的數(shù)組arr, 把元素分別放入另一個數(shù)組tmp中,在判斷該元素在arr中不存在才允許放入tmp中,具體實現(xiàn)如下,需要的朋友可以看看2014-08-08