W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
Well 是一種會引起內(nèi)容凹陷顯示或插圖效果的容器 <div>。為了創(chuàng)建 Well,只需要簡單地把內(nèi)容放在帶有 class .well 的 <div> 中即可。下面的實例演示了一個默認的 Well:
<!DOCTYPE html> <html> <head> <title>Bootstrap 實例 - 默認的 Well</title> <link rel="external nofollow" target="_blank" rel="external nofollow" target="_blank" rel="stylesheet"> <script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js" rel="external nofollow" rel="external nofollow" ></script> <script src="http://cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js" rel="external nofollow" rel="external nofollow" ></script> </head> <body> <div class="well">您好,我在 Well 中!</div> </body> </html>
結(jié)果如下所示:
您可以使用可選類 well-lg 或 well-sm 來改變 Well 的尺寸大小。這兩個類是與 .well 類結(jié)合使用的。這兩個類會影響內(nèi)邊距(padding),根據(jù)使用的類,Well 會顯示得更大或者更小。
<!DOCTYPE html> <html> <head> <title>Bootstrap 實例 - Well 的尺寸大小</title> <link rel="external nofollow" target="_blank" rel="external nofollow" target="_blank" rel="stylesheet"> <script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js" rel="external nofollow" rel="external nofollow" ></script> <script src="http://cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js" rel="external nofollow" rel="external nofollow" ></script> </head> <body> <div class="well well-lg">您好,我在大的 Well 中!</div> <div class="well well-sm">您好,我在小的 Well 中!</div> </body> </html>
結(jié)果如下所示:
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: