在Bootstrap中使用類的按鈕類型

Bootstrap has 7 different types of buttons with contextual classes from which we can create buttons easily by using these classes (.btn-default, .btn-success, .btn-danger, .btn-primary, .btn-info, .btn-warning, .btn-link).

Bootstrap具有上下文類型的 7種不同類型的按鈕 ,我們可以通過使用這些類輕松地創建按鈕( .btn-default , .btn-success , .btn-danger , .btn-primary , .btn-info , .btn-警告 , .btn-link )。

Example Code:

示例代碼:

<button type="button" class="btn btn-default">Button Default</button>
<button type="button" class="btn btn-primary">Button Primary</button>
<button type="button" class="btn btn-success">Button Success</button>
<button type="button" class="btn btn-info">Button Info</button>
<button type="button" class="btn btn-warning">Button Warning</button>
<button type="button" class="btn btn-danger">Button Danger</button>
<button type="button" class="btn btn-link">Button Link</button>

We can also make different size of buttons by using different button size classes (.btn-sm, .btn-lg, .btn-md, .btn-xs).

我們還可以通過使用不同的按鈕大小類( .btn-sm , .btn-lg , .btn-md , .btn-xs )來制作不同大小的按鈕。

Example Code:

示例代碼:

<button type="button" class="btn btn-primary btn-lg">Large button</button>
<button type="button" class="btn btn-default btn-md">Mediumbutton</button>
<button type="button" class="btn btn-success btn-sm">Small button </button>
<button type="button" class="btn btn-danger btn-xs">extraSmall button </button>

Here we also have a .btn-block level button spans the entire width of the parent element.

在這里,我們還有一個.btn塊級按鈕,它跨越父元素的整個寬度。

Example Code:

示例代碼:

<button type="button" class="btn btn-primary btn-block">Button 1</button>
<button type="button" class="btn btn-danger btn-lgbtn-block">Button 2</button>

A button can be set to an .active class (appear pressed) or a .disabled class (unclickable) state.

可以將按鈕設置為.active類(按顯示)或.disabled類( 不可單擊)狀態。

Example Code:

示例代碼:

<button type="button" class="btn btn-primary active">Active Primary</button>
<button type="button" class="btn btn-primary disabled">Disabled Primary</button>

Result

結果

Buttons in bootstrap

Conclusion:

結論:

In this article, we have learnt about different button classes with contextual class, button size class, block button classes and active & disabled classes in Bootstrap. If you have doubt/query, feel free to ask in the comment box.

在本文中,我們了解了Bootstrap中不同的按鈕類,包括上下文類按鈕大小類,塊按鈕類以及活動和禁用類 。 如果您有疑問/疑問,請隨時在評論框中提問。

翻譯自: https://www.includehelp.com/html/types-of-buttons-using-classes-in-bootstrap.aspx

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/541769.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/541769.shtml
英文地址,請注明出處:http://en.pswp.cn/news/541769.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

php json encode中文亂碼,php json_encode中文亂碼如何解決

php encode中文亂碼的解決辦法&#xff1a;首先打開相應的PHP文件&#xff1b;然后使用正則語句“preg_replace("#\\\u([0-9a-f]{4})#ie","iconv(UCS-2BE, UTF-8...)”將編碼替換成中文即可。本文列舉3個方法&#xff0c;實現json_encode()后的string顯示中文問…

鄉村圖景(轉載)

轉自: http://cul.qq.com/a/20160205/046437.htm 我丈夫家在湖北孝感孝昌縣的一個村子。2005年第一次過年回到他家&#xff0c;印象最深的就是嫂子。我暗自問當時的男友&#xff0c;“哥哥盡管算不上特別帥氣&#xff0c;但為何找了這么難看的嫂子&#xff1f;”后來才發現&…

stl向量最大值_C ++ STL中向量的最小和最大元素

stl向量最大值Given a vector and we have to find the smallest (minimum) and largest (maximum) elements. 給定一個向量&#xff0c;我們必須找到最小(最小)和最大(最大)元素。 查找向量的最小和最大元素 (Finding vectors minimum & maximum elements) To find minim…

oracle如何設置備份計劃任務,Oracle數據庫設置任務計劃備份一周的備份記錄

Oracle 數據庫備份&#xff1a;--保留最近一周的備份記錄&#xff1b;正文&#xff1a;開始代碼如下:echo 設置備份文件存放文件夾...set "tbufE:\Cway\backup"echo 設置備份文件名(以星期幾命名&#xff0c;即備份文件只保存最近一周)...set name%date%set name%nam…

索引(轉載自百度百科)

Oracle索引 編輯本詞條缺少信息欄、名片圖&#xff0c;補充相關內容使詞條更完整&#xff0c;還能快速升級&#xff0c;趕緊來編輯吧&#xff01;在oracle索引是一種供服務器在表中快速查找一個行的數據庫結構。合理使用索引能夠大大提高數據庫的運行效率。目錄 1 概念及作用 2…

阿姆斯特朗數_阿姆斯特朗的功能依賴公理 數據庫管理系統

阿姆斯特朗數Armstrong axioms are a complete set of inference rules or axioms, introduced and developed by William W. Armstrong in 1974. The inference rules are sound which is used to test logical inferences of functional dependencies. The axiom which also …

ORACLE JOB 失敗 查看,Oracle JOB異常中斷原因分析

注釋今天研發同事找我確認 PKG_WMS.proc_TaskMain 存儲的 job 是否還在運行&#xff0c;竟發現 dba_jobs.NEXT_DATE4000/1/1&#xff0c;如下看看究竟原因吧~JOB 信息&#xff1a;參數&#xff1a;BROKEN : 中斷標記 ,N 啟動、Y 中斷 --> DBMS_JOBS.BROKEN(job_id,TRUE/FA…

ruby打印_Ruby程序打印一個數字的乘法表

ruby打印打印乘法表 (Printing multiplication table) This requires a very simple logic where we only have to multiply the number with digits from 1 to 10. This can be implemented by putting the multiplication statement inside a loop. We have mentioned two wa…

步驟1:JMeter 錄制腳本接口測試

JMeter 常用測試方法簡介 1.下載安裝 http://jmeter.apache.org/download_jmeter.cgi 安裝JDK&#xff0c;配置環境變量JAVA_HOME. 系統要求&#xff1a;JMeter2.11 需要JDK1.6以上的版本支持運行 2.學習Jmeter元件 http://jmeter.apache.org/usermanual/component_reference.h…

模擬斷電oracle數據不一致,Oracle數據庫案例整理-Oracle系統運行時故障-斷電導致數據文件狀態變為RECOVER...

1.1 現象描述異常斷電&#xff0c;數據庫數據文件的狀態由ONLINE變為RECOVER。系統顯示如下信息&#xff1a;SQL> select file_name ,tablespace_name ,online_status from dba_data_files;FILE_NAME---------------------------------------------------------------…

python日歷模塊_Python日歷模塊| prmonth()方法與示例

python日歷模塊Python calendar.prmonth()方法 (Python calendar.prmonth() Method) prmonth() method is an inbuilt method of the calendar module in Python. It works on simple text calendars and prints the calendar of the given month of the given year. Also, the…

多例模式

多例&#xff1a;只是單例的一種延伸 不必過于在意各種模式的名字&#xff0c;重要的是學會融會貫通&#xff0c;把生產的car放到集合中 類似JDBC 的連接池 把連接對象放到池中 多例模式特點&#xff1a; 1. 多例類可以有多個實例 2. 多例類必須自己創建自己的實例&a…

Oracle public view,【易錯概念】以太坊Solidity函數的external/internal,public/private,view/pure/payable區別...

1. 函數類型&#xff1a;內部(internal)函數和外部(external)函數函數類型是一種表示函數的類型。可以將一個函數賦值給另一個函數類型的變量&#xff0c;也可以將一個函數作為參數進行傳遞&#xff0c;還能在函數調用中返回函數類型變量。 函數類型有兩類&#xff1a;- 內部(i…

c-style字符字符串_C字符串-能力問題與解答

c-style字符字符串C programming String Aptitude Questions and Answers: In this section you will find C Aptitude Questions and Answers on Strings, String is the set of characters and String related Aptitude Questions and Answers you will find here. C編程Stri…

PHP Smarty template for website

/******************************************************************************* PHP Smarty template for website* 說明&#xff1a;* 之前一直在想將MVC的方式加在PHP做的網站上&#xff0c;這樣比較好處理&#xff0c;相對來說比較好* 處理…

ftp連接oracle服務器,使用SSL加密連接FTP - 架建SSL安全加密的FTP服務器(圖)_服務器應用_Linux公社-Linux系統門戶網站...

四、使用SSL加密連接FTP啟用Serv-U服務器的SSL功能后&#xff0c;就可以利用此功能安全傳輸數據了&#xff0c;但FTP客戶端程序必須支持SSL功能才行。 如果我們直接使用IE瀏覽器進行登錄則會出現圖4顯示的錯誤信息&#xff0c;一方面是以為沒有修改默認的端口21為990&#xff0…

c# 情感傾向_C否則-能力傾向問題與解答

c# 情感傾向C programming if else Aptitude Questions and Answers: In this section you will find C Aptitude Questions and Answers on condition statements – if else, nested if else, ladder if else, conditional operators etc. C語言編程如果有問題&#xff0c;請…

springboot中使用緩存shiro-ehcache

在pom.xml中注入緩存依賴&#xff0c;版本(Sep 09, 2016)spring-context-support 包含支持UI模版&#xff08;Velocity&#xff0c;FreeMarker&#xff0c;JasperReports&#xff09;&#xff0c; 郵件服務&#xff0c; 腳本服務(JRuby)&#xff0c; 緩存Cache&#xff08;EHCa…

oracle 微信公眾號,關于微信公眾號貼代碼的方法

微信公眾號碼上貼代碼一直一來都是個頭疼的問題。吐槽一句&#xff1a;要是后臺編輯器支持markdown就好了。今天教大家用在線markdown排版工具&#xff0c;把代碼完美貼到微信公眾號上。長話短說&#xff0c;今天用到的兩個工具&#xff1a;首先&#xff0c;以一段代碼為例。假…

計算理論 形式語言與自動機_下推式自動機(PDA)| 計算理論

計算理論 形式語言與自動機Pushdown Automaton (PDA) is a kind of Automaton which comes under the theory of Computation that appoints stack. The word Pushdown stands due to the fact that the stack can be pushed down as operations can only work on the elements…