Upload
salome-rojas
View
72
Download
3
Embed Size (px)
DESCRIPTION
BOOSTRAP
Citation preview
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 1/72
ComponentsOveradozenreusablecomponentsbuilttoprovideiconography,dropdowns,inputgroups,navigation,alerts,andmuchmore.
(//srv.carbonads.net/ads/click/x/GTND423ICESD5KJJF6A4YKQWCKBD5K3LCESI4Z3JCE7IV2JYCVBIKKQKC6BDC23NCA7DTK3EHJNCLSIZ?segment=placement:getbootstrapcom)
Yourbrainhasaround70,000thoughtsaday.Use1tocompletelyautomateyourbusiness.(//srv.carbonads.net/ads/click/x/GTND423ICESD5KJJF6A4YKQWCKBD5K3LCESI4Z3JCE7IV2JYCVBIKKQKC6BDC23NCA7DTK3EHJNCLSIZ?segment=placement:getbootstrapcom)
adsviaCarbon(http://carbonads.com)
glyphiconglyphiconasterisk glyphiconglyphiconplus glyphiconglyphiconeuro glyphiconglyphiconeur
GlyphiconsAvailableglyphsIncludesover250glyphsinfontformatfromtheGlyphiconHalflingsset.Glyphicons(http://glyphicons.com/)Halflingsarenormallynotavailableforfree,buttheircreatorhasmadethemavailableforBootstrapfreeofcost.Asathankyou,weonlyaskthatyouincludealinkbacktoGlyphicons(http://glyphicons.com/)wheneverpossible.
* +
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 2/72
glyphiconglyphiconminus glyphiconglyphiconcloud glyphiconglyphiconenvelope glyphiconglyphiconpencil
glyphiconglyphiconglass glyphiconglyphiconmusic glyphiconglyphiconsearch glyphiconglyphiconheart
glyphiconglyphiconstar glyphiconglyphiconstarempty glyphiconglyphiconuser glyphiconglyphiconfilm
glyphiconglyphiconthlarge glyphiconglyphiconth glyphiconglyphiconthlist glyphiconglyphiconok
glyphiconglyphiconremove glyphiconglyphiconzoomin glyphiconglyphiconzoomout glyphiconglyphiconoff
glyphiconglyphiconsignal glyphiconglyphiconcog glyphiconglyphicontrash glyphiconglyphiconhome
glyphiconglyphiconfile glyphiconglyphicontime glyphiconglyphiconroad glyphiconglyphicondownloadalt
glyphiconglyphicondownload glyphiconglyphiconupload glyphiconglyphiconinbox glyphiconglyphiconplaycircle
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 3/72
glyphiconglyphiconrepeat glyphiconglyphiconrefresh glyphiconglyphiconlistalt glyphiconglyphiconlock
glyphiconglyphiconflag glyphiconglyphiconheadphones
glyphiconglyphiconvolumeoff glyphiconglyphiconvolumedown
glyphiconglyphiconvolumeup glyphiconglyphiconqrcode glyphiconglyphiconbarcode glyphiconglyphicontag
glyphiconglyphicontags glyphiconglyphiconbook glyphiconglyphiconbookmark glyphiconglyphiconprint
glyphiconglyphiconcamera glyphiconglyphiconfont glyphiconglyphiconbold glyphiconglyphiconitalic
glyphiconglyphicontextheight glyphiconglyphicontextwidth glyphiconglyphiconalignleft glyphiconglyphiconaligncenter
glyphiconglyphiconalignright glyphiconglyphiconalignjustify glyphiconglyphiconlist glyphiconglyphiconindentleft
glyphiconglyphiconindentright glyphiconglyphiconfacetimevideo
glyphiconglyphiconpicture glyphiconglyphiconmapmarker
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 4/72
glyphiconglyphiconadjust glyphiconglyphicontint glyphiconglyphiconedit glyphiconglyphiconshare
glyphiconglyphiconcheck glyphiconglyphiconmove glyphiconglyphiconstepbackward
glyphiconglyphiconfastbackward
glyphiconglyphiconbackward glyphiconglyphiconplay glyphiconglyphiconpause glyphiconglyphiconstop
glyphiconglyphiconforward glyphiconglyphiconfastforward glyphiconglyphiconstepforward
glyphiconglyphiconeject
glyphiconglyphiconchevronleft glyphiconglyphiconchevronright
glyphiconglyphiconplussign glyphiconglyphiconminussign
glyphiconglyphiconremovesign
glyphiconglyphiconoksign glyphiconglyphiconquestionsign
glyphiconglyphiconinfosign
glyphiconglyphiconscreenshot glyphiconglyphiconremovecircle
glyphiconglyphiconokcircle glyphiconglyphiconbancircle
glyphiconglyphiconarrowleft glyphiconglyphiconarrowright glyphiconglyphiconarrowup glyphiconglyphiconarrowdown
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 5/72
glyphiconglyphiconsharealt glyphiconglyphiconresizefull glyphiconglyphiconresizesmall glyphiconglyphiconexclamationsign
glyphiconglyphicongift glyphiconglyphiconleaf glyphiconglyphiconfire glyphiconglyphiconeyeopen
glyphiconglyphiconeyeclose glyphiconglyphiconwarningsign
glyphiconglyphiconplane glyphiconglyphiconcalendar
glyphiconglyphiconrandom glyphiconglyphiconcomment glyphiconglyphiconmagnet glyphiconglyphiconchevronup
glyphiconglyphiconchevrondown
glyphiconglyphiconretweet glyphiconglyphiconshoppingcart
glyphiconglyphiconfolderclose
glyphiconglyphiconfolderopen glyphiconglyphiconresizevertical
glyphiconglyphiconresizehorizontal
glyphiconglyphiconhdd
glyphiconglyphiconbullhorn glyphiconglyphiconbell glyphiconglyphiconcertificate glyphiconglyphiconthumbsup
glyphiconglyphiconthumbsdown
glyphiconglyphiconhandright glyphiconglyphiconhandleft glyphiconglyphiconhandup
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 6/72
glyphiconglyphiconhanddown glyphiconglyphiconcirclearrowright
glyphiconglyphiconcirclearrowleft
glyphiconglyphiconcirclearrowup
glyphiconglyphiconcirclearrowdown
glyphiconglyphiconglobe glyphiconglyphiconwrench glyphiconglyphicontasks
glyphiconglyphiconfilter glyphiconglyphiconbriefcase glyphiconglyphiconfullscreen glyphiconglyphicondashboard
glyphiconglyphiconpaperclip glyphiconglyphiconheartempty
glyphiconglyphiconlink glyphiconglyphiconphone
glyphiconglyphiconpushpin glyphiconglyphiconusd glyphiconglyphicongbp glyphiconglyphiconsort
glyphiconglyphiconsortbyalphabet
glyphiconglyphiconsortbyalphabetalt
glyphiconglyphiconsortbyorder
glyphiconglyphiconsortbyorderalt
glyphiconglyphiconsortbyattributes
glyphiconglyphiconsortbyattributesalt
glyphiconglyphiconunchecked glyphiconglyphiconexpand
glyphiconglyphiconcollapsedown
glyphiconglyphiconcollapseup glyphiconglyphiconlogin glyphiconglyphiconflash
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 7/72
glyphiconglyphiconlogout glyphiconglyphiconnewwindow
glyphiconglyphiconrecord glyphiconglyphiconsave
glyphiconglyphiconopen glyphiconglyphiconsaved glyphiconglyphiconimport glyphiconglyphiconexport
glyphiconglyphiconsend glyphiconglyphiconfloppydisk glyphiconglyphiconfloppysaved
glyphiconglyphiconfloppyremove
glyphiconglyphiconfloppysave glyphiconglyphiconfloppyopen
glyphiconglyphiconcreditcard glyphiconglyphicontransfer
glyphiconglyphiconcutlery glyphiconglyphiconheader glyphiconglyphiconcompressed
glyphiconglyphiconearphone
glyphiconglyphiconphonealt glyphiconglyphicontower glyphiconglyphiconstats glyphiconglyphiconsdvideo
glyphiconglyphiconhdvideo glyphiconglyphiconsubtitles glyphiconglyphiconsoundstereo
glyphiconglyphiconsounddolby
glyphiconglyphiconsound51 glyphiconglyphiconsound61 glyphiconglyphiconsound71 glyphiconglyphiconcopyrightmark
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 8/72
glyphiconglyphiconregistrationmark
glyphiconglyphiconclouddownload
glyphiconglyphiconcloudupload
glyphiconglyphicontreeconifer
glyphiconglyphicontreedeciduous
glyphiconglyphiconcd glyphiconglyphiconsavefile glyphiconglyphiconopenfile
glyphiconglyphiconlevelup glyphiconglyphiconcopy glyphiconglyphiconpaste glyphiconglyphiconalert
glyphiconglyphiconequalizer glyphiconglyphiconking glyphiconglyphiconqueen glyphiconglyphiconpawn
glyphiconglyphiconbishop glyphiconglyphiconknight glyphiconglyphiconbabyformula
glyphiconglyphicontent
glyphiconglyphiconblackboard glyphiconglyphiconbed glyphiconglyphiconapple glyphiconglyphiconerase
glyphiconglyphiconhourglass glyphiconglyphiconlamp glyphiconglyphiconduplicate glyphiconglyphiconpiggybank
glyphiconglyphiconscissors glyphiconglyphiconbitcoin glyphiconglyphiconbtc glyphiconglyphiconxbt
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 9/72
glyphiconglyphiconyen glyphiconglyphiconjpy glyphiconglyphiconruble glyphiconglyphiconrub
glyphiconglyphiconscale glyphiconglyphiconicelolly glyphiconglyphiconicelollytasted
glyphiconglyphiconeducation
glyphiconglyphiconoptionhorizontal
glyphiconglyphiconoptionvertical
glyphiconglyphiconmenuhamburger
glyphiconglyphiconmodalwindow
glyphiconglyphiconoil glyphiconglyphicongrain glyphiconglyphiconsunglasses glyphiconglyphicontextsize
glyphiconglyphicontextcolor glyphiconglyphicontextbackground
glyphiconglyphiconobjectaligntop
glyphiconglyphiconobjectalignbottom
glyphiconglyphiconobjectalignhorizontal
glyphiconglyphiconobjectalignleft
glyphiconglyphiconobjectalignvertical
glyphiconglyphiconobjectalignright
glyphiconglyphicontriangleright
glyphiconglyphicontriangleleft glyphiconglyphicontrianglebottom
glyphiconglyphicontriangletop
glyphiconglyphiconconsole glyphiconglyphiconsuperscript glyphiconglyphiconsubscript glyphiconglyphiconmenuleft
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 10/72
glyphiconglyphiconmenuright glyphiconglyphiconmenudown glyphiconglyphiconmenuup
HowtouseForperformancereasons,alliconsrequireabaseclassandindividualiconclass.Touse,placethefollowingcodejustaboutanywhere.Besuretoleaveaspacebetweentheiconandtextforproperpadding.
Don'tmixwithothercomponentsIconclassescannotbedirectlycombinedwithothercomponents.Theyshouldnotbeusedalongwithotherclassesonthesameelement.Instead,addanested andapplytheiconclassestothe .
OnlyforuseonemptyelementsIconclassesshouldonlybeusedonelementsthatcontainnotextcontentandhavenochildelements.
ChangingtheiconfontlocationBootstrapassumesiconfontfileswillbelocatedinthe ../fonts/ directory,relativetothecompiledCSSfiles.MovingorrenamingthosefontfilesmeansupdatingtheCSSinoneofthreeways:
Changethe @iconfontpath and/or @iconfontname variablesinthesourceLessfiles.UtilizetherelativeURLsoption(http://lesscss.org/usage/#commandlineusagerelativeurls)providedbytheLesscompiler.Changethe url() pathsinthecompiledCSS.
Usewhateveroptionbestsuitsyourspecificdevelopmentsetup.
AccessibleiconsModernversionsofassistivetechnologieswillannounceCSSgeneratedcontent,aswellasspecificUnicodecharacters.Toavoidunintendedandconfusingoutputinscreenreaders(particularlywheniconsareusedpurelyfordecoration),wehidethemwiththe aria
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 11/72
hidden="true" attribute.
Ifyou'reusinganicontoconveymeaning(ratherthanonlyasadecorativeelement),ensurethatthismeaningisalsoconveyedtoassistivetechnologiesforinstance,includeadditionalcontent,visuallyhiddenwiththe .sronly class.
Ifyou'recreatingcontrolswithnoothertext(suchasa thatonlycontainsanicon),youshouldalwaysprovidealternativecontenttoidentifythepurposeofthecontrol,sothatitwillmakesensetousersofassistivetechnologies.Inthiscase,youcouldaddan arialabel attributeonthecontrolitself.
ExamplesUsetheminbuttons,buttongroupsforatoolbar,navigation,orprependedforminputs.
Star
Aniconusedinanalerttoconveythatit'sanerrormessage,withadditional .sronly texttoconveythishinttousersofassistivetechnologies.
Star Star StarStar
EXAMPLE
Enteravalidemailaddress
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 12/72
Error:Enteravalidemailaddress
DropdownsToggleable,contextualmenufordisplayinglistsoflinks.MadeinteractivewiththedropdownJavaScriptplugin(../javascript/#dropdowns).
ExampleWrapthedropdown'striggerandthedropdownmenuwithin .dropdown ,oranotherelementthatdeclares position:relative; .Thenaddthemenu'sHTML.
DropdownActionAnotheractionSomethingelsehereSeparatedlink
Dropdownmenuscanbechangedtoexpandupwards(insteadofdownwards)byadding .dropup totheparent.
Dropdown
Action
Anotheraction
Somethingelsehere
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 13/72
DropupActionAnotheractionSomethingelsehereSeparatedlink
AlignmentBydefault,adropdownmenuisautomaticallypositioned100%fromthetopandalongtheleftsideofitsparent.Add .dropdownmenuright toa .dropdownmenu torightalignthedropdownmenu.
MayrequireadditionalpositioningDropdownsareautomaticallypositionedviaCSSwithinthenormalflowofthedocument.Thismeansdropdownsmaybecroppedbyparentswithcertain overflow propertiesorappearoutofboundsoftheviewport.Addresstheseissuesonyourownastheyarise.
Deprecated .pullright alignmentAsofv3.1.0,we'vedeprecated .pullright ondropdownmenus.Torightalignamenu,use.dropdownmenuright .Rightalignednavcomponentsinthenavbaruseamixinversionofthisclasstoautomaticallyalignthemenu.Tooverrideit,use .dropdownmenuleft .
...
HeadersAddaheadertolabelsectionsofactionsinanydropdownmenu.
Dropup
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 14/72
...Dropdownheader...
DividerAddadividertoseparateseriesoflinksinadropdownmenu.
......
DisabledmenuitemsAdd .disabled toa inthedropdowntodisablethelink.
Dropdown
Dropdownheader
Action
Anotheraction
SomethingelsehereDropdownheader
Separatedlink
EXAMPLE
Dropdown
Action
Anotheraction
Somethingelsehere
Separatedlink
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 15/72
RegularlinkDisabledlinkAnotherlink
ButtongroupsGroupaseriesofbuttonstogetheronasinglelinewiththebuttongroup.AddonoptionalJavaScriptradioandcheckboxstylebehaviorwithourbuttonsplugin(../javascript/#buttons).
Tooltips&popoversinbuttongroupsrequirespecialsettingWhenusingtooltipsorpopoversonelementswithina .btngroup ,you'llhavetospecifytheoption container:'body' toavoidunwantedsideeffects(suchastheelementgrowingwiderand/orlosingitsroundedcornerswhenthetooltiporpopoveristriggered).
Ensurecorrect role andprovidealabelInorderforassistivetechnologiessuchasscreenreaderstoconveythataseriesofbuttonsisgrouped,anappropriate role attributeneedstobeprovided.Forbuttongroups,thiswouldberole="group" ,whiletoolbarsshouldhavea role="toolbar" .
Oneexceptionaregroupswhichonlycontainasinglecontrol(forinstancethejustifiedbuttongroupswith elements)oradropdown.
Inaddition,groupsandtoolbarsshouldbegivenanexplicitlabel,asmostassistivetechnologieswillotherwisenotannouncethem,despitethepresenceofthecorrect role attribute.Intheexamplesprovidedhere,weuse arialabel ,butalternativessuchas arialabelledby canalsobeused.
Dropdown
Regularlink
Disabledlink
Anotherlink
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 16/72
BasicexampleWrapaseriesofbuttonswith .btn in .btngroup .
LeftMiddleRight
ButtontoolbarCombinesetsof intoa formorecomplexcomponents.
.........
SizingInsteadofapplyingbuttonsizingclassestoeverybuttoninagroup,justadd .btngroup* toeach.btngroup ,includingwhennestingmultiplegroups.
Left Middle Right
EXAMPLE
1 2 3 4 5 6 7 8
EXAMPLE
Left Middle Right
Left Middle Right
Left Middle Right
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 17/72
............
NestingPlacea .btngroup withinanother .btngroup whenyouwantdropdownmenusmixedwithaseriesofbuttons.
12
DropdownDropdownlinkDropdownlink
VerticalvariationMakeasetofbuttonsappearverticallystackedratherthanhorizontally.Splitbuttondropdownsarenotsupportedhere.
Left Middle Right
1 2 Dropdown
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 18/72
...
JustifiedbuttongroupsMakeagroupofbuttonsstretchatequalsizestospantheentirewidthofitsparent.Alsoworkswithbuttondropdownswithinthebuttongroup.
HandlingbordersDuetothespecificHTMLandCSSusedtojustifybuttons(namely display:tablecell ),thebordersbetweenthemaredoubled.Inregularbuttongroups, marginleft:1px isusedtostackthebordersinsteadofremovingthem.However, margin doesn'tworkwith display:tablecell .Asaresult,dependingonyourcustomizationstoBootstrap,youmaywishtoremoveorrecolortheborders.
IE8andbordersInternetExplorer8doesn'trenderbordersonbuttonsinajustifiedbuttongroup,whetherit'son or elements.Togetaroundthat,wrapeachbuttoninanother .btngroup .
See#12476(https://github.com/twbs/bootstrap/issues/12476)formoreinformation.
With elementsJustwrapaseriesof .btn sin .btngroup.btngroupjustified .
Button
Button
Dropdown
Button
Button
Dropdown
Dropdown
Dropdown
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 19/72
...
LinksactingasbuttonsIfthe elementsareusedtoactasbuttonstriggeringinpagefunctionality,ratherthannavigatingtoanotherdocumentorsectionwithinthecurrentpagetheyshouldalsobegivenanappropriate role="button" .
With elementsTousejustifiedbuttongroupswith elements,youmustwrapeachbuttoninabuttongroup.Mostbrowsersdon'tproperlyapplyourCSSforjustificationto elements,butsincewesupportbuttondropdowns,wecanworkaroundthat.
LeftMiddleRight
Left Middle Right
Left Middle Dropdown
EXAMPLE
Left Middle Right
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 20/72
ButtondropdownsUseanybuttontotriggeradropdownmenubyplacingitwithina .btngroup andprovidingthepropermenumarkup.
PlugindependencyButtondropdownsrequirethedropdownplugin(../javascript/#dropdowns)tobeincludedinyourversionofBootstrap.
SinglebuttondropdownsTurnabuttonintoadropdowntogglewithsomebasicmarkupchanges.
ActionActionAnotheractionSomethingelsehereSeparatedlink
SplitbuttondropdownsSimilarly,createsplitbuttondropdownswiththesamemarkupchanges,onlywithaseparatebutton.
Default Primary Success Info Warning Danger
EXAMPLE
Default Primary Success Info Warning Danger
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 21/72
ActionToggleDropdownActionAnotheractionSomethingelsehereSeparatedlink
SizingButtondropdownsworkwithbuttonsofallsizes.
Largebutton
Smallbutton
Extrasmallbutton
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 22/72
Largebutton...
Smallbutton...
Extrasmallbutton...
DropupvariationTriggerdropdownmenusaboveelementsbyadding .dropup totheparent.
Dropup Rightdropup
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 23/72
DropupToggleDropdown
InputgroupsExtendformcontrolsbyaddingtextorbuttonsbefore,after,oronbothsidesofanytextbased .Use .inputgroup withan .inputgroupaddon toprependorappendelementstoasingle .formcontrol .
Textual sonlyAvoidusing elementshereastheycannotbefullystyledinWebKitbrowsers.
Avoidusing elementshereastheir rows attributewillnotberespectedinsomecases.
Tooltips&popoversininputgroupsrequirespecialsettingWhenusingtooltipsorpopoversonelementswithinan .inputgroup ,you'llhavetospecifytheoption container:'body' toavoidunwantedsideeffects(suchastheelementgrowingwiderand/orlosingitsroundedcornerswhenthetooltiporpopoveristriggered).
Don'tmixwithothercomponentsDonotmixformgroupsorgridcolumnclassesdirectlywithinputgroups.Instead,nesttheinputgroupinsideoftheformgrouporgridrelatedelement.
Alwaysaddlabels
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 24/72
Screenreaderswillhavetroublewithyourformsifyoudon'tincludealabelforeveryinput.Fortheseinputgroups,ensurethatanyadditionallabelorfunctionalityisconveyedtoassistivetechnologies.
Theexacttechniquetobeused( elementshiddenusingthe .sronly class,oruseofthe arialabel , arialabelledby , ariadescribedby , title or placeholder attribute)andwhatadditionalinformationwillneedtobeconveyedwillvarydependingontheexacttypeofinterfacewidgetyou'reimplementing.Theexamplesinthissectionprovideafewsuggested,casespecificapproaches.
BasicexamplePlaceoneaddonorbuttononeithersideofaninput.Youmayalsoplaceoneonbothsidesofaninput.
Wedonotsupportmultipleaddonsonasingleside.
Wedonotsupportmultipleformcontrolsinasingleinputgroup.
@
@example.com
$.00
@
@example.com
$ .00
EXAMPLE
Username
Recipient'susername
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 25/72
SizingAddtherelativeformsizingclassestothe .inputgroup itselfandcontentswithinwillautomaticallyresizenoneedforrepeatingtheformcontrolsizeclassesoneachelement.
@
@
@
CheckboxesandradioaddonsPlaceanycheckboxorradiooptionwithinaninputgroup'saddoninsteadoftext.
@
@
@
EXAMPLE
EXAMPLE
Username
Username
Username
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 26/72
ButtonaddonsButtonsininputgroupsareabitdifferentandrequireoneextralevelofnesting.Insteadof .inputgroupaddon ,you'llneedtouse .inputgroupbtn towrapthebuttons.Thisisrequiredduetodefaultbrowserstylesthatcannotbeoverridden.
Go!
EXAMPLE
Searchfor...
Searchfor... Go!
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 27/72
Go!Go!
Buttonswithdropdowns
Action
EXAMPLE
Action
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 28/72
ActionActionAnotheractionSomethingelsehereSeparatedlinkActionActionAnotheractionSomethingelsehereSeparatedlink
Segmentedbuttons
Action
EXAMPLE
Action
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 29/72
NavsNavsavailableinBootstraphavesharedmarkup,startingwiththebase .nav class,aswellassharedstates.Swapmodifierclassestoswitchbetweeneachstyle.
UsingnavsfortabpanelsrequiresJavaScripttabspluginFortabswithtabbableareas,youmustusethetabsJavaScriptplugin(../javascript/#tabs).Themarkupwillalsorequireadditional role andARIAattributesseetheplugin'sexamplemarkup(../javascript/#tabsusage)forfurtherdetails.
MakenavsusedasnavigationaccessibleIfyouareusingnavstoprovideanavigationbar,besuretoadda role="navigation" tothemostlogicalparentcontainerofthe ,orwrapa elementaroundthewholenavigation.Donotaddtheroletothe itself,asthiswouldpreventitfrombeingannouncedasanactuallistbyassistivetechnologies.
TabsNotethe .navtabs classrequiresthe .nav baseclass.
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 30/72
HomeProfileMessages
PillsTakethatsameHTML,butuse .navpills instead:
HomeProfileMessages
Pillsarealsoverticallystackable.Justadd .navstacked .
...
JustifiedEasilymaketabsorpillsequalwidthsoftheirparentatscreenswiderthan768pxwith .navjustified .Onsmallerscreens,thenavlinksarestacked.
Justifiednavbarnavlinksarecurrentlynotsupported.
Home Profile Messages
Home Profile Messages
EXAMPLE
Home
Profile
Messages
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 31/72
SafariandresponsivejustifiednavsAsofv8.0,Safariexhibitsabuginwhichresizingyourbrowserhorizontallycausesrenderingerrorsinthejustifiednavthatarecleareduponrefreshing.Thisbugisalsoshowninthejustifiednavexample(../examples/justifiednav/).
...
...
DisabledlinksForanynavcomponent(tabsorpills),add .disabled forgraylinksandnohovereffects.
LinkfunctionalitynotimpactedThisclasswillonlychangethe 'sappearance,notitsfunctionality.UsecustomJavaScripttodisablelinkshere.
Home
Profile
Messages
Home
Profile
Messages
EXAMPLE
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 32/72
...Disabledlink...
UsingdropdownsAdddropdownmenuswithalittleextraHTMLandthedropdownsJavaScriptplugin(../javascript/#dropdowns).
Tabswithdropdowns
...Dropdown......
Pillswithdropdowns
Clickablelink Clickablelink Disabledlink
Home Help Dropdown
EXAMPLE
Home Help Dropdown
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 33/72
...Dropdown......
NavbarDefaultnavbarNavbarsareresponsivemetacomponentsthatserveasnavigationheadersforyourapplicationorsite.Theybegincollapsed(andaretoggleable)inmobileviewsandbecomehorizontalastheavailableviewportwidthincreases.
Justifiednavbarnavlinksarecurrentlynotsupported.
OverflowingcontentSinceBootstrapdoesn'tknowhowmuchspacethecontentinyournavbarneeds,youmightrunintoissueswithcontentwrappingintoasecondrow.Toresolvethis,youcan:
a. Reducetheamountorwidthofnavbaritems.b. Hidecertainnavbaritemsatcertainscreensizesusingresponsiveutilityclasses
(../css/#responsiveutilities).c. Changethepointatwhichyournavbarswitchesbetweencollapsedandhorizontalmode.
Customizethe @gridfloatbreakpoint variableoraddyourownmediaquery.
RequiresJavaScriptpluginIfJavaScriptisdisabledandtheviewportisnarrowenoughthatthenavbarcollapses,itwillbeimpossibletoexpandthenavbarandviewthecontentwithinthe .navbarcollapse .
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 34/72
Theresponsivenavbarrequiresthecollapseplugin(../javascript/#collapse)tobeincludedinyourversionofBootstrap.
ChangingthecollapsedmobilenavbarbreakpointThenavbarcollapsesintoitsverticalmobileviewwhentheviewportisnarrowerthan @gridfloatbreakpoint ,andexpandsintoitshorizontalnonmobileviewwhentheviewportisatleast@gridfloatbreakpoint inwidth.AdjustthisvariableintheLesssourcetocontrolwhenthenavbarcollapses/expands.Thedefaultvalueis 768px (thesmallest"small"or"tablet"screen).
MakenavbarsaccessibleBesuretousea elementor,ifusingamoregenericelementsuchasa ,addarole="navigation" toeverynavbartoexplicitlyidentifyitasalandmarkregionforusersofassistivetechnologies.
TogglenavigationBrand
Link(current)
LinkDropdownActionAnotheraction
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 35/72
AnotheractionSomethingelsehereSeparatedlinkOnemoreseparatedlinkSubmitLinkDropdownActionAnotheractionSomethingelsehereSeparatedlink
BrandimageReplacethenavbarbrandwithyourownimagebyswappingthetextforan .Sincethe .navbarbrand hasitsownpaddingandheight,youmayneedtooverridesomeCSSdependingonyourimage.
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 36/72
FormsPlaceformcontentwithin .navbarform forproperverticalalignmentandcollapsedbehaviorinnarrowviewports.Usethealignmentoptionstodecidewhereitresideswithinthenavbarcontent.
Asaheadsup, .navbarform sharesmuchofitscodewith .forminline viamixin.Someformcontrols,likeinputgroups,mayrequirefixedwidthstobeshowupproperlywithinanavbar.
Submit
MobiledevicecaveatsTherearesomecaveatsregardingusingformcontrolswithinfixedelementsonmobiledevices.Seeourbrowsersupportdocs(../gettingstarted/#supportfixedpositionkeyboards)fordetails.
AlwaysaddlabelsScreenreaderswillhavetroublewithyourformsifyoudon'tincludealabelforeveryinput.Fortheseinlineforms,youcanhidethelabelsusingthe .sronly class.Therearefurtheralternativemethodsofprovidingalabelforassistivetechnologies,suchasthe arialabel ,arialabelledby or title attribute.Ifnoneoftheseispresent,screenreadersmayresorttousingthe placeholder attribute,ifpresent,butnotethatuseof placeholder asareplacementforotherlabellingmethodsisnotadvised.
Buttons
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 37/72
Addthe .navbarbtn classto elementsnotresidingina toverticallycentertheminthenavbar.
Signin
ContextspecificusageLikethestandardbuttonclasses(../css/#buttons), .navbarbtn canbeusedon and elements.However,neither .navbarbtn northestandardbuttonclassesshouldbeusedon elementswithin .navbarnav .
TextWrapstringsoftextinanelementwith .navbartext ,usuallyona tagforproperleadingandcolor.
SignedinasMarkOtto
NonnavlinksForfolksusingstandardlinksthatarenotwithintheregularnavbarnavigationcomponent,usethe.navbarlink classtoaddthepropercolorsforthedefaultandinversenavbaroptions.
SignedinasMarkOtto
ComponentalignmentAlignnavlinks,forms,buttons,ortext,usingthe .navbarleft or .navbarright utilityclasses.BothclasseswilladdaCSSfloatinthespecifieddirection.Forexample,toalignnavlinks,puttheminaseparate withtherespectiveutilityclassapplied.
Theseclassesaremixinedversionsof .pullleft and .pullright ,butthey'rescopedtomediaqueriesforeasierhandlingofnavbarcomponentsacrossdevicesizes.
EXAMPLE
EXAMPLE
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 38/72
RightaligningmultiplecomponentsNavbarscurrentlyhavealimitationwithmultiple .navbarright classes.Toproperlyspacecontent,weusenegativemarginonthelast .navbarright element.Whentherearemultipleelementsusingthatclass,thesemarginsdon'tworkasintended.
We'llrevisitthiswhenwecanrewritethatcomponentinv4.
FixedtotopAdd .navbarfixedtop andincludea .container or .containerfluid tocenterandpadnavbarcontent.
...
BodypaddingrequiredThefixednavbarwilloverlayyourothercontent,unlessyouadd padding tothetopofthe .Tryoutyourownvaluesoruseoursnippetbelow.Tip:Bydefault,thenavbaris50pxhigh.
body{paddingtop:70px;}
MakesuretoincludethisafterthecoreBootstrapCSS.
FixedtobottomAdd .navbarfixedbottom andincludea .container or .containerfluid tocenterandpadnavbarcontent.
...
EXAMPLE
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 39/72
BodypaddingrequiredThefixednavbarwilloverlayyourothercontent,unlessyouadd padding tothebottomofthe .Tryoutyourownvaluesoruseoursnippetbelow.Tip:Bydefault,thenavbaris50pxhigh.
body{paddingbottom:70px;}
MakesuretoincludethisafterthecoreBootstrapCSS.
StatictopCreateafullwidthnavbarthatscrollsawaywiththepagebyadding .navbarstatictop andincludea.container or .containerfluid tocenterandpadnavbarcontent.
Unlikethe .navbarfixed* classes,youdonotneedtochangeanypaddingonthe body .
...
InvertednavbarModifythelookofthenavbarbyadding .navbarinverse .
...
BreadcrumbsIndicatethecurrentpage'slocationwithinanavigationalhierarchy.
EXAMPLE
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 40/72
SeparatorsareautomaticallyaddedinCSSthrough :before and content .
HomeLibraryData
PaginationProvidepaginationlinksforyoursiteorappwiththemultipagepaginationcomponent,orthesimplerpageralternative.
DefaultpaginationSimplepaginationinspiredbyRdio,greatforappsandsearchresults.Thelargeblockishardtomiss,easilyscalable,andprovideslargeclickareas.
Home
Home / Library
Home / Library / Data
EXAMPLE
1 2 3 4 5
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 41/72
12345
DisabledandactivestatesLinksarecustomizablefordifferentcircumstances.Use .disabled forunclickablelinksand .active toindicatethecurrentpage.
1(current)...
Youcanoptionallyswapoutactiveordisabledanchorsfor ,oromittheanchorinthecaseoftheprevious/nextarrows,toremoveclickfunctionalitywhileretainingintendedstyles.
2 3 4 5
EXAMPLE
1
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 42/72
1(current)...
SizingFancylargerorsmallerpagination?Add .paginationlg or .paginationsm foradditionalsizes.
.........
PagerQuickpreviousandnextlinksforsimplepaginationimplementationswithlightmarkupandstyles.It'sgreatforsimplesiteslikeblogsormagazines.
DefaultexampleBydefault,thepagercenterslinks.
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
EXAMPLE
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 43/72
PreviousNext
AlignedlinksAlternatively,youcanaligneachlinktothesides:
Older
Newer
OptionaldisabledstatePagerlinksalsousethegeneral .disabled utilityclassfromthepagination.
OlderNewer
Previous Next
Older Newer
EXAMPLE
Older Newer
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 44/72
LabelsExample
ExampleheadingNew
AvailablevariationsAddanyofthebelowmentionedmodifierclassestochangetheappearanceofalabel.
DefaultPrimarySuccessInfoWarningDanger
Havetonsoflabels?
Exampleheading NewExampleheading NewExampleheading NewExampleheading NewExampleheading NewExampleheading New
EXAMPLE
Default Primary Success Info Warning Danger
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 45/72
Renderingproblemscanarisewhenyouhavedozensofinlinelabelswithinanarrowcontainer,eachcontainingitsown inlineblock element(likeanicon).Thewayaroundthisissettingdisplay:inlineblock; .Forcontextandanexample,see#13219(https://github.com/twbs/bootstrap/issues/13219).
BadgesEasilyhighlightneworunreaditemsbyaddinga tolinks,Bootstrapnavs,andmore.
Inbox42
Messages4
SelfcollapsingWhentherearenoneworunreaditems,badgeswillsimplycollapse(viaCSS's :empty selector)providednocontentexistswithin.
CrossbrowsercompatibilityBadgeswon'tselfcollapseinInternetExplorer8becauseitlackssupportforthe :emptyselector.
AdaptstoactivenavstatesBuiltinstylesareincludedforplacingbadgesinactivestatesinpillnavigations.
Inbox 42
Messages 4
EXAMPLE
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 46/72
Home42ProfileMessages3
JumbotronAlightweight,flexiblecomponentthatcanoptionallyextendtheentireviewporttoshowcasekeycontentonyoursite.
Hello,world!...Learnmore
Tomakethejumbotronfullwidth,andwithoutroundedcorners,placeitoutsideall .container sandinsteadadda .container within.
Home 42 Profile Messages 3
Hello,world!Thisisasimpleherounit,asimplejumbotronstylecomponentforcallingextraattentiontofeaturedcontentorinformation.
Learnmore
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 47/72
...
PageheaderAsimpleshellforan h1 toappropriatelyspaceoutandsegmentsectionsofcontentonapage.Itcanutilizethe h1 'sdefault small element,aswellasmostothercomponents(withadditionalstyles).
ExamplepageheaderSubtextforheader
ThumbnailsExtendBootstrap'sgridsystem(../css/#grid)withthethumbnailcomponenttoeasilydisplaygridsofimages,videos,text,andmore.
Ifyou'relookingforPinterestlikepresentationofthumbnailsofvaryingheightsand/orwidths,you'llneedtouseathirdpartypluginsuchasMasonry(http://masonry.desandro.com),Isotope(http://isotope.metafizzy.co),orSalvattore(http://salvattore.com).
Defaultexample
ExamplepageheaderSubtextforheader
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 48/72
Bydefault,Bootstrap'sthumbnailsaredesignedtoshowcaselinkedimageswithminimalrequiredmarkup.
...
CustomcontentWithabitofextramarkup,it'spossibletoaddanykindofHTMLcontentlikeheadings,paragraphs,orbuttonsintothumbnails.
171x180 171x180
171x180 171x180
EXAMPLE
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 49/72
242x200
ThumbnaillabelCrasjustoodio,dapibusacfacilisisin,egestasegetquam.Donecidelitnonmiportagravidaategetmetus.Nullamiddoloridnibhultriciesvehiculautidelit.
Button Button
242x200
ThumbnaillabelCrasjustoodio,dapibusacfacilisisin,egestasegetquam.Donecidelitnonmiportagravidaategetmetus.Nullamiddoloridnibhultriciesvehiculautidelit.
Button Button
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 50/72
Thumbnaillabel...ButtonButton
AlertsProvidecontextualfeedbackmessagesfortypicaluseractionswiththehandfulofavailableandflexiblealertmessages.
Examples
242x200
ThumbnaillabelCrasjustoodio,dapibusacfacilisisin,egestasegetquam.Donecidelitnonmiportagravidaategetmetus.Nullamiddoloridnibhultriciesvehiculautidelit.
Button Button
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 51/72
Wrapanytextandanoptionaldismissbuttonin .alert andoneofthefourcontextualclasses(e.g.,.alertsuccess )forbasicalertmessages.
NodefaultclassAlertsdon'thavedefaultclasses,onlybaseandmodifierclasses.Adefaultgrayalertdoesn'tmaketoomuchsense,soyou'rerequiredtospecifyatypeviacontextualclass.Choosefromsuccess,info,warning,ordanger.
............
DismissiblealertsBuildonanyalertbyaddinganoptional .alertdismissible andclosebutton.
RequiresJavaScriptalertpluginForfullyfunctioning,dismissiblealerts,youmustusethealertsJavaScriptplugin(../javascript/#alerts).
Welldone!Yousuccessfullyreadthisimportantalertmessage.
Headsup!Thisalertneedsyourattention,butit'snotsuperimportant.
Warning!Bettercheckyourself,you'renotlookingtoogood.
Ohsnap!Changeafewthingsupandtrysubmittingagain.
EXAMPLE
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 52/72
Warning!Bettercheckyourself,you'renotlookingtoogood.
EnsureproperbehavioracrossalldevicesBesuretousethe elementwiththe datadismiss="alert" dataattribute.
LinksinalertsUsethe .alertlink utilityclasstoquicklyprovidematchingcoloredlinkswithinanyalert.
...
...
...
...
Warning!Bettercheckyourself,you'renotlookingtoogood.
Welldone!Yousuccessfullyreadthisimportantalertmessage.
Headsup!Thisalertneedsyourattention,butit'snotsuperimportant.
Warning!Bettercheckyourself,you'renotlookingtoogood.
Ohsnap!Changeafewthingsupandtrysubmittingagain.
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 53/72
ProgressbarsProvideuptodatefeedbackontheprogressofaworkfloworactionwithsimpleyetflexibleprogressbars.
CrossbrowsercompatibilityProgressbarsuseCSS3transitionsandanimationstoachievesomeoftheireffects.ThesefeaturesarenotsupportedinInternetExplorer9andbeloworolderversionsofFirefox.Opera12doesnotsupportanimations.
BasicexampleDefaultprogressbar.
60%Complete
WithlabelRemovethe with .sronly classfromwithintheprogressbartoshowavisiblepercentage.
EXAMPLE
60%
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 54/72
60%
Toensurethatthelabeltextremainslegibleevenforlowpercentages,consideraddinga minwidth totheprogressbar.
0%
2%
ContextualalternativesProgressbarsusesomeofthesamebuttonandalertclassesforconsistentstyles.
0%
2%
EXAMPLE
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 55/72
40%Complete(success)
20%Complete
60%Complete(warning)
80%Complete(danger)
StripedUsesagradienttocreateastripedeffect.NotavailableinIE9andbelow.
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 56/72
40%Complete(success)
20%Complete
60%Complete(warning)
80%Complete(danger)
AnimatedAdd .active to .progressbarstriped toanimatethestripesrighttoleft.NotavailableinIE9andbelow.
45%Complete
Toggleanimation
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 57/72
StackedPlacemultiplebarsintothesame .progress tostackthem.
35%Complete(success)20%Complete(warning)10%Complete(danger)
MediaobjectAbstractobjectstylesforbuildingvarioustypesofcomponents(likeblogcomments,Tweets,etc)thatfeaturealeftorrightalignedimagealongsidetextualcontent.
DefaultmediaThedefaultmediadisplaysamediaobject(images,video,audio)totheleftorrightofacontentblock.
EXAMPLE
MediaheadingCrassitametnibhlibero,ingravidanulla.Nullavelmetusscelerisqueantesollicitudincommodo.Craspurusodio,vestibuluminvulputateat,tempusviverraturpis.Fuscecondimentumnuncacnisivulputatefringilla.Doneclaciniaconguefelisinfaucibus.
MediaheadingCrassitametnibhlibero,ingravidanulla.Nullavelmetusscelerisqueantesollicitudincommodo.Craspurusodio,vestibuluminvulputateat,tempusviverraturpis.Fuscecondimentumnuncacnisivulputatefringilla.Doneclaciniaconguefelisinfaucibus.
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 58/72
Mediaheading...
Theclasses .pullleft and .pullright alsoexistandwerepreviouslyusedaspartofthemediacomponent,butaredeprecatedforthatuseasofv3.3.0.Theyareapproximatelyequivalentto .medialeft and .mediaright ,exceptthat .mediaright shouldbeplacedafterthe .mediabody inthehtml.
MediaalignmentTheimagesorothermediacanbealignedtop,middle,orbottom.Thedefaultistopaligned.
NestedmediaheadingCrassitametnibhlibero,ingravidanulla.Nullavelmetusscelerisqueantesollicitudincommodo.Craspurusodio,vestibuluminvulputateat,tempusviverraturpis.Fuscecondimentumnuncacnisivulputatefringilla.Doneclaciniaconguefelisinfaucibus.
MediaheadingCrassitametnibhlibero,ingravidanulla.Nullavelmetusscelerisqueantesollicitudincommodo.Craspurusodio,vestibuluminvulputateat,tempusviverraturpis.
MediaheadingCrassitametnibhlibero,ingravidanulla.Nullavelmetusscelerisqueantesollicitudincommodo.Craspurusodio,vestibuluminvulputateat,tempusviverraturpis.
TopalignedmediaCrassitametnibhlibero,ingravidanulla.Nullavelmetusscelerisqueantesollicitudincommodo.Craspurusodio,vestibuluminvulputateat,tempusviverraturpis.Fuscecondimentumnuncacnisivulputatefringilla.Doneclaciniaconguefelisinfaucibus.
Donecsedodiodui.Nullamquisrisusegeturnamollisornareveleuleo.Cumsociisnatoquepenatibusetmagnisdisparturientmontes,nasceturridiculusmus.
Middlealignedmedia
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 59/72
Middlealignedmedia...
MedialistWithabitofextramarkup,youcanusemediainsidelist(usefulforcommentthreadsorarticleslists).
Crassitametnibhlibero,ingravidanulla.Nullavelmetusscelerisqueantesollicitudincommodo.Craspurusodio,vestibuluminvulputateat,tempusviverraturpis.Fuscecondimentumnuncacnisivulputatefringilla.Doneclaciniaconguefelisinfaucibus.
Donecsedodiodui.Nullamquisrisusegeturnamollisornareveleuleo.Cumsociisnatoquepenatibusetmagnisdisparturientmontes,nasceturridiculusmus.
BottomalignedmediaCrassitametnibhlibero,ingravidanulla.Nullavelmetusscelerisqueantesollicitudincommodo.Craspurusodio,vestibuluminvulputateat,tempusviverraturpis.Fuscecondimentumnuncacnisivulputatefringilla.Doneclaciniaconguefelisinfaucibus.
Donecsedodiodui.Nullamquisrisusegeturnamollisornareveleuleo.Cumsociisnatoquepenatibusetmagnisdisparturientmontes,nasceturridiculusmus.
MediaheadingCrassitametnibhlibero,ingravidanulla.Nullavelmetusscelerisqueantesollicitudincommodo.Craspurusodio,vestibuluminvulputateat,tempusviverraturpis.
NestedmediaheadingCrassitametnibhlibero,ingravidanulla.Nullavelmetusscelerisqueantesollicitudincommodo.Craspurusodio,vestibuluminvulputateat,tempusviverraturpis.
NestedmediaheadingCrassitametnibhlibero,ingravidanulla.Nullavelmetusscelerisqueantesollicitudincommodo.Craspurusodio,vestibuluminvulputateat,tempusviverraturpis.
Nestedmediaheading
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 60/72
Mediaheading...
ListgroupListgroupsareaflexibleandpowerfulcomponentfordisplayingnotonlysimplelistsofelements,butcomplexoneswithcustomcontent.
BasicexampleThemostbasiclistgroupissimplyanunorderedlistwithlistitems,andtheproperclasses.Builduponitwiththeoptionsthatfollow,oryourownCSSasneeded.
Crassitametnibhlibero,ingravidanulla.Nullavelmetusscelerisqueantesollicitudincommodo.Craspurusodio,vestibuluminvulputateat,tempusviverraturpis.
Crasjustoodio
Dapibusacfacilisisin
Morbileorisus
Portaacconsecteturac
Vestibulumateros
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 61/72
CrasjustoodioDapibusacfacilisisinMorbileorisusPortaacconsecteturacVestibulumateros
BadgesAddthebadgescomponenttoanylistgroupitemanditwillautomaticallybepositionedontheright.
14Crasjustoodio
LinkeditemsLinkifylistgroupitemsbyusinganchortagsinsteadoflistitems(thatalsomeansaparent insteadofan ).Noneedforindividualparentsaroundeachelement.
14Crasjustoodio
2Dapibusacfacilisisin
1Morbileorisus
EXAMPLE
Dapibusacfacilisisin
Morbileorisus
Portaacconsecteturac
Vestibulumateros
EXAMPLE
Crasjustoodio
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 62/72
CrasjustoodioDapibusacfacilisisinMorbileorisusPortaacconsecteturacVestibulumateros
ButtonitemsListgroupitemsmaybebuttonsinsteadoflistitems(thatalsomeansaparent insteadofan ).Noneedforindividualparentsaroundeachelement.Don'tusethestandard .btn classeshere.
CrasjustoodioDapibusacfacilisisinMorbileorisusPortaacconsecteturacVestibulumateros
DisableditemsAdd .disabled toa .listgroupitem tograyitouttoappeardisabled.
Crasjustoodio
Dapibusacfacilisisin
Morbileorisus
Portaacconsecteturac
Vestibulumateros
EXAMPLE
Crasjustoodio
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 63/72
CrasjustoodioDapibusacfacilisisinMorbileorisusPortaacconsecteturacVestibulumateros
ContextualclassesUsecontextualclassestostylelistitems,defaultorlinked.Alsoincludes .active state.
Dapibusacfacilisisin
Morbileorisus
Portaacconsecteturac
Vestibulumateros
Dapibusacfacilisisin
Crassitametnibhlibero
Portaacconsecteturac
Vestibulumateros
Dapibusacfacilisisin
Crassitametnibhlibero
Portaacconsecteturac
Vestibulumateros
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 64/72
DapibusacfacilisisinCrassitametnibhliberoPortaacconsecteturacVestibulumateros
DapibusacfacilisisinCrassitametnibhliberoPortaacconsecteturacVestibulumateros
CustomcontentAddnearlyanyHTMLwithin,evenforlinkedlistgroupsliketheonebelow.
Listgroupitemheading...
ListgroupitemheadingDonecidelitnonmiportagravidaategetmetus.Maecenasseddiamegetrisusvariusblandit.
ListgroupitemheadingDonecidelitnonmiportagravidaategetmetus.Maecenasseddiamegetrisusvariusblandit.
EXAMPLE
ListgroupitemheadingDonecidelitnonmiportagravidaategetmetus.Maecenasseddiamegetrisusvariusblandit.
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 65/72
PanelsWhilenotalwaysnecessary,sometimesyouneedtoputyourDOMinabox.Forthosesituations,trythepanelcomponent.
BasicexampleBydefault,allthe .panel doesisapplysomebasicborderandpaddingtocontainsomecontent.
Basicpanelexample
PanelwithheadingEasilyaddaheadingcontainertoyourpanelwith .panelheading .Youmayalsoincludeany witha .paneltitle classtoaddaprestyledheading.
Forproperlinkcoloring,besuretoplacelinksinheadingswithin .paneltitle .
Basicpanelexample
EXAMPLE
Panelheadingwithouttitle
Panelcontent
Paneltitle
Panelcontent
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 66/72
PanelheadingwithouttitlePanelcontent
PaneltitlePanelcontent
PanelwithfooterWrapbuttonsorsecondarytextin .panelfooter .Notethatpanelfootersdonotinheritcolorsandborderswhenusingcontextualvariationsastheyarenotmeanttobeintheforeground.
PanelcontentPanelfooter
ContextualalternativesLikeothercomponents,easilymakeapanelmoremeaningfultoaparticularcontextbyaddinganyofthecontextualstateclasses.
Panelcontent
Panelfooter
EXAMPLE
Paneltitle
Panelcontent
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 67/72
...............
WithtablesAddanynonbordered .table withinapanelforaseamlessdesign.Ifthereisa .panelbody ,weaddanextrabordertothetopofthetableforseparation.
Paneltitle
Panelcontent
Paneltitle
Panelcontent
Paneltitle
Panelcontent
Paneltitle
Panelcontent
Panelheading
Somedefaultpanelcontenthere.Nullavitaeelitlibero,apharetraaugue.Aeneanlaciniabibendumnullasedconsectetur.Aeneaneuleoquam.Pellentesqueornaresemlaciniaquamvenenatisvestibulum.Nullamiddoloridnibhultriciesvehiculautidelit.
# FirstName LastName Username
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 68/72
Panelheading...
...
Ifthereisnopanelbody,thecomponentmovesfrompanelheadertotablewithoutinterruption.
Panelheading
...
Withlistgroups
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry theBird @twitter
Panelheading
# FirstName LastName Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry theBird @twitter
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 69/72
Easilyincludefullwidthlistgroupswithinanypanel.
Panelheading...
CrasjustoodioDapibusacfacilisisinMorbileorisusPortaacconsecteturacVestibulumateros
Responsiveembed
Panelheading
Somedefaultpanelcontenthere.Nullavitaeelitlibero,apharetraaugue.Aeneanlaciniabibendumnullasedconsectetur.Aeneaneuleoquam.Pellentesqueornaresemlaciniaquamvenenatisvestibulum.Nullamiddoloridnibhultriciesvehiculautidelit.
Crasjustoodio
Dapibusacfacilisisin
Morbileorisus
Portaacconsecteturac
Vestibulumateros
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 70/72
Allowbrowserstodeterminevideoorslideshowdimensionsbasedonthewidthoftheircontainingblockbycreatinganintrinsicratiothatwillproperlyscaleonanydevice.
Rulesaredirectlyappliedto , , ,and elementsoptionallyuseanexplicitdescendantclass .embedresponsiveitem whenyouwanttomatchthestylingforotherattributes.
ProTip!Youdon'tneedtoinclude frameborder="0" inyour sasweoverridethatforyou.
Wells
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 71/72
Star 82,316 Fork 32,991 Follow@getbootstrap(https://twitter.com/getbootstrap)Tweet(https://twitter.com/share)
DefaultwellUsethewellasasimpleeffectonanelementtogiveitaninseteffect.
...
OptionalclassesControlpaddingandroundedcornerswithtwooptionalmodifierclasses.
...
...
Look,I'minawell!
EXAMPLE
Look,I'minalargewell!
EXAMPLE
Look,I'minasmallwell!
EXAMPLE
18/6/2015 ComponentsBootstrap
http://getbootstrap.com/components/ 72/72
Designedandbuiltwithalltheloveintheworldby@mdo(https://twitter.com/mdo)and@fat(https://twitter.com/fat).
Maintainedbythecoreteam(https://github.com/orgs/twbs/people)withthehelpofourcontributors(https://github.com/twbs/bootstrap/graphs/contributors).
CodelicensedunderMIT(https://github.com/twbs/bootstrap/blob/master/LICENSE),documentationunderCCBY3.0(https://creativecommons.org/licenses/by/3.0/).
Currentlyv3.3.5 GitHub(https://github.com/twbs/bootstrap) Examples(../gettingstarted/#examples) v2.3.2docs(../2.3.2/) About(../about/) Expo(http://expo.getbootstrap.com) Blog(http://blog.getbootstrap.com) Issues(https://github.com/twbs/bootstrap/issues) Releases
(https://github.com/twbs/bootstrap/releases)