<!doctype html>
<
html
lang
=
"en"
>
<
head
>
<
title
>Carousel Disable touch swiping</
title
>
<
link
href
=
rel
=
"stylesheet"
integrity
=
"sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin
=
"anonymous"
>
<
script
src
=
integrity
=
"sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin
=
"anonymous"
>
</
script
>
</
head
>
<
body
>
<
h1
class
=
"m-4 text-success"
>
GeeksforGeeks
</
h1
>
<
h4
class
=
"ms-4"
>
Bootstrap 5 Carousel Disable touch swiping
</
h4
>
<
div
class="container mb-4 p-4
text-light text-center">
<
div
id
=
"carouselExample"
class
=
"carousel slide carousel-fade mb-4"
data-bs-touch
=
"false"
data-bs-interval
=
"false"
>
<
div
class
=
"carousel-inner"
>
<
div
class
=
"carousel-item bg-dark active pb-4"
>
<
h1
class
=
"m-4 text-success"
>
This is the first slide
</
h1
>
<
img
src
=
width
=
"25%"
alt
=
"GFG LOGO"
>
</
div
>
<
div
class
=
"carousel-item bg-dark pb-4"
>
<
h1
class
=
"m-4 text-warning text-center"
>
This is the second slide
</
h1
>
<
div
class
=
"text-center"
>
<
img
src
=
width
=
"25%"
alt
=
"GFG LOGO"
>
</
div
>
</
div
>
<
div
class
=
"carousel-item bg-dark pb-4"
>
<
h1
class
=
"m-4 text-warning"
>
This is the third slide
</
h1
>
<
div
class
=
"text-center"
>
<
img
src
=
width
=
"25%"
alt
=
"GFG LOGO"
>
</
div
>
</
div
>
</
div
>
<
button
class
=
"carousel-control-prev"
type
=
"button"
data-bs-target
=
"#carouselExample"
data-bs-slide
=
"prev"
>
<
span
class
=
"carousel-control-prev-icon"
></
span
>
<
span
class
=
"visually-hidden"
>
Previous
</
span
>
</
button
>
<
button
class
=
"carousel-control-next"
type
=
"button"
data-bs-target
=
"#carouselExample"
data-bs-slide
=
"next"
>
<
span
class
=
"carousel-control-next-icon"
></
span
>
<
span
class
=
"visually-hidden"
>
Next
</
span
>
</
button
>
</
div
>
<
div
id
=
"carouselExample2"
class
=
"carousel slide carousel-fade"
data-bs-ride
=
"carousel"
data-bs-interval
=
"false"
>
<
div
class
=
"carousel-inner"
>
<
div
class
=
"carousel-item bg-dark active pb-4"
>
<
h1
class
=
"m-4 text-success"
>
This is the first slide
</
h1
>
<
img
src
=
width
=
"25%"
alt
=
"GFG LOGO"
>
</
div
>
<
div
class
=
"carousel-item bg-dark pb-4"
>
<
h1
class
=
"m-4 text-warning text-center"
>
This is the second slide
</
h1
>
<
div
class
=
"text-center"
>
<
img
src
=
width
=
"25%"
alt
=
"GFG LOGO"
>
</
div
>
</
div
>
<
div
class
=
"carousel-item bg-dark pb-4"
>
<
h1
class
=
"m-4 text-warning"
>
This is the third slide
</
h1
>
<
div
class
=
"text-center"
>
<
img
src
=
width
=
"25%"
alt
=
"GFG LOGO"
>
</
div
>
</
div
>
</
div
>
<
button
class
=
"carousel-control-prev"
type
=
"button"
data-bs-target
=
"#carouselExample2"
data-bs-slide
=
"prev"
>
<
span
class
=
"carousel-control-prev-icon"
></
span
>
<
span
class
=
"visually-hidden"
>
Previous
</
span
>
</
button
>
<
button
class
=
"carousel-control-next"
type
=
"button"
data-bs-target
=
"#carouselExample2"
data-bs-slide
=
"next"
>
<
span
class
=
"carousel-control-next-icon"
></
span
>
<
span
class
=
"visually-hidden"
>
Next
</
span
>
</
button
>
</
div
>
</
div
>
</
body
>
</
html
>