Help me in adding slider in CSS bootstrap
Loading
Help me in adding slider in CSS bootstrap
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Mohamed Azarudeen ZRank #297 · 8.5K reputationPosted May 13, 2023, 2:40 AM EDT
Slide 1
Some description for slide 1 goes here
Slide 2
Some description for slide 2 goes here
Slide 3
Some description for slide 3 goes here
Previous
Next
Rajkiran SwainRank #165 · 14.4K reputationPosted May 12, 2023, 10:17 AM EDT
Image 1 Caption Image 2 Caption Image 3 Caption Previous NextDeepak RawatRank #646 · 3.7K reputationPosted May 12, 2023, 11:48 AM EDT
This is you can add a slider/carousel using CSS and Bootstrap
Replace
"image1.jpg","image2.jpg", and"image3.jpg"with the URLs or paths to your own images also, you can customize css according to your need.Tuhin PaulRank #7 · 71.9K reputationPosted May 12, 2023, 10:12 PM EDT
See the code to add a slider to a webpage using CSS and Bootstrap:
.carousel-inner img { width: 100%; height: auto; } .carousel-caption { background-color: rgba(0,0,0,0.5); position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 80%; padding: 20px; } .carousel-caption h3 { color: #fff; } .carousel-caption p { color: #fff; } .carousel-control.left, .carousel-control.right { background-image: none; } .carousel-control { top: 50%; transform: translateY(-50%); height: 40px; width: 40px; background-color: rgba(0,0,0,0.5); opacity: 0.5; } .carousel-control:hover { background-color: rgba(0,0,0,0.7); opacity: 1; } .carousel-control i { font-size: 25px; color: #fff; } .carousel-indicators { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); margin-bottom: 10px; } .carousel-indicators li { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background-color: rgba(255,255,255,0.5); margin-right: 5px; cursor: pointer; } .carousel-indicators li.active { background-color: #fff