Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Tabs"
Bootstrap 3.0.0 Snippet by
maritonsc54
3.0.0
tabs
Preview
HTML
CSS
View Full Screen
Fork
Fork this
13.5K
 
10 Fav
Post to Facebook
Tweet this
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <h1>Tabs</h1> <main> <input id="tab1" type="radio" name="tabs" checked> <label for="tab1">Tab1</label> <input id="tab2" type="radio" name="tabs"> <label for="tab2">Tab2</label> <input id="tab3" type="radio" name="tabs"> <label for="tab3">Reports</label> <input id="tab4" type="radio" name="tabs"> <label for="tab4">Tab4</label> <section id="content1"> <p> 1111111111111 </p> </section> <section id="content2"> <p> 22222222222222 </p> </section> <section id="content3"> <p> 3333333333333333333 </p> </section> <section id="content4"> <p> 4444444444444444444 </p> </section> </main>
@import url('https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'); body { font: 14px/1 'Open Sans', sans-serif; color: #555; background: #eee; } main { min-width: 320px; max-width: 1100px; padding: 20px; margin: 0 auto; background: #fff; } section { display: none; padding: 20px 0 0; border-top: 1px solid #ddd; } input { display: none; } label { display: inline-block; margin: 0 0 -1px; padding: 15px 25px; font-weight: 600; text-align: center; color: #bbb; border: 1px solid transparent; } label:before { font-family: fontawesome; font-weight: normal; margin-right: 10px; } label[for*='1']:before { content: '\f2bc'; } label[for*='2']:before { content: '\f0ca'; } label[for*='3']:before { content: '\f02f'; } label[for*='4']:before { content: '\f1a9'; } label:hover { color: #888; cursor: pointer; } input:checked + label { color: #555; border: 1px solid #ddd; border-top: 2px solid orange; border-bottom: 1px solid #fff; } #tab1:checked ~ #content1, #tab2:checked ~ #content2, #tab3:checked ~ #content3, #tab4:checked ~ #content4 { display: block; }
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76