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
"gravatar"
Bootstrap 3.0.0 Snippet by
harunpehlivan
3.0.0
Preview
HTML
CSS
View Full Screen
Fork
Fork this
1.3K
 
0 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 ----------> <body> <div class="photo_slider"> <input type="radio" name="slider" class="slide-radio1" checked id="slider_1"> <input type="radio" name="slider" class="slide-radio2" id="slider_2"> <div class="slider-pagination"> <label for="slider_1" class="page1"></label> <label for="slider_2" class="page2"></label> </div> <div class="next control"> <label for="slider_1" class="numb1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> <path d="M298.3 256L131.1 81.9c-4.2-4.3-4.1-11.4.2-15.8l29.9-30.6c4.3-4.4 11.3-4.5 15.5-.2L380.9 248c2.2 2.2 3.2 5.2 3 8.1.1 3-.9 5.9-3 8.1L176.7 476.8c-4.2 4.3-11.2 4.2-15.5-.2L131.3 446c-4.3-4.4-4.4-11.5-.2-15.8L298.3 256z"/> </svg> </label> <label for="slider_2" class="numb2"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> <path d="M298.3 256L131.1 81.9c-4.2-4.3-4.1-11.4.2-15.8l29.9-30.6c4.3-4.4 11.3-4.5 15.5-.2L380.9 248c2.2 2.2 3.2 5.2 3 8.1.1 3-.9 5.9-3 8.1L176.7 476.8c-4.2 4.3-11.2 4.2-15.5-.2L131.3 446c-4.3-4.4-4.4-11.5-.2-15.8L298.3 256z"/> </svg> </label> </div> <div class="previous control"> <label for="slider_1" class="numb1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> <path d="M213.7 256L380.9 81.9c4.2-4.3 4.1-11.4-.2-15.8l-29.9-30.6c-4.3-4.4-11.3-4.5-15.5-.2L131.1 247.9c-2.2 2.2-3.2 5.2-3 8.1-.1 3 .9 5.9 3 8.1l204.2 212.7c4.2 4.3 11.2 4.2 15.5-.2l29.9-30.6c4.3-4.4 4.4-11.5.2-15.8L213.7 256z"/> </svg> </label> <label for="slider_2" class="numb2"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> <path d="M213.7 256L380.9 81.9c4.2-4.3 4.1-11.4-.2-15.8l-29.9-30.6c-4.3-4.4-11.3-4.5-15.5-.2L131.1 247.9c-2.2 2.2-3.2 5.2-3 8.1-.1 3 .9 5.9 3 8.1l204.2 212.7c4.2 4.3 11.2 4.2 15.5-.2l29.9-30.6c4.3-4.4 4.4-11.5.2-15.8L213.7 256z"/> </svg> </label> </div> <div class="slider slide_img_01"></div> <div class="slider slide_img_02"></div> </div> </body>
body , html { height : 100%; } html { font-size : 62.5%; box-sizing : border-box; } .photo_slider { position : relative; display : block; overflow : hidden; width : 100%; max-width : 1440px; height : 800px; max-height : 100%; margin : 0 auto; } .slider { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; align-content: center; position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 1; z-index: 0; transition: transform 1600ms; transform: scale(1); } /* Slider images */ .slide_img_01 { background : url('https://tebm.files.wordpress.com/2017/07/cropped-arge-proje-egitim-esnasc4b1nda-hallerim-1.jpg') no-repeat center; background-size: cover; left: 0; } .slide_img_02 { background : url('https://tebm.files.wordpress.com/2017/07/cropped-gravatartebm-qr.png') no-repeat center; background-size : cover; left: 100% } /* Next and Prev arrow */ .control { position: absolute; top: 50%; margin-top: -24px; z-index: 55; } .control label svg { width : 48px; height : 48px; fill : #fff; stroke : currentColor; stroke-width : 0; } .control label svg:hover { transition : all .2s ease; fill : #000; } .control label { z-index: 0; display: none; cursor: pointer; opacity: 0.5; } .control label:hover { opacity: 1.0; } .next { right: 1%; } .previous { left: 1%; } /* Slider Pagger */ .slider-pagination { position: absolute; bottom: 20px; width: 100%; left: 0; text-align: center; z-index: 1000; } .slider-pagination label { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: rgba(255,255,255,0.2); margin: 0 2px; border: solid 1px rgba(255,255,255,0.4); cursor: pointer; } /* Slider Pagger arrow event */ .slide-radio1:checked ~ .next .numb2, .slide-radio2:checked ~ .next .numb1, .slide-radio2:checked ~ .previous .numb1, .slide-radio1:checked ~ .previous .numb2 { display: block; z-index: 1 } /* Slider Pagger event */ .slide-radio1:checked ~ .slider-pagination .page1, .slide-radio2:checked ~ .slider-pagination .page2 { background: rgba(255,255,255,1) } /* Slide effect */ .slide-radio1:checked ~ .slider { transform: translateX(0%); } .slide-radio2:checked ~ .slider { transform: translateX(-100%); } /* Slider Mobile ====================================================================================== */ @media only screen and (max-width: 767px) { .photo_slider { position : relative; width : 100%; height : 400px; } .slider > div { padding: 0 2% } .control { position: absolute; top: 60%; margin-top: -24px; z-index: 55; } .control label svg { width : 32px; height : 32px; fill : #fff; stroke : currentColor; stroke-width : 0; } }
Related:
See More
Free Template
Material Dashboard
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76