<!doctype html>
<
html
lang
=
"en"
>
<
head
>
<
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 Offcanvas backdrop</
h4
>
<
div
class
=
"container d-grid mb-4 p-4 w-50"
>
<
button
class
=
"btn btn-success mb-3"
type
=
"button"
data-bs-toggle
=
"offcanvas"
data-bs-target
=
"#offcanvasWithBothOptions"
>
Open Offcanvas with body scrolling and backdrop
</
button
>
<
img
src
=
class
=
"w-100"
alt
=
""
>
<
p
class
=
"font-weight-bold"
>
Most popular course on DSA trusted by
over 75,000 students! Built with years of
experience by industry experts the course
gives you a complete package of video
lectures, practice problems, quizzes,
discussion forums, and contests. Start Today!
</
p
>
</
div
>
<
div
class
=
"offcanvas offcanvas-start bg-dark text-light"
data-bs-scroll
=
"true"
id
=
"offcanvasWithBothOptions"
>
<
div
class
=
"offcanvas-header"
>
<
h5
class
=
"offcanvas-title"
id
=
"offcanvasScrollingLabel"
>
This is the offcanvas with body scrolling
and backdrop
</
h5
>
<
button
type
=
"button"
class="btn-close text-reset
bg-light"
data-bs-dismiss
=
"offcanvas"
aria-label
=
"Close"
>
</
button
>
</
div
>
<
div
class
=
"offcanvas-body"
>
<
p
>We can enable the background body
scrolling and the backdrop while the
offcanvas is open with the scroll usage option.</
p
>
<
br
>
<
div
class
=
"d-flex flex-column w-75 justify-center"
>
<
img
src
=
alt
=
""
>
<
button
type
=
"button"
class
=
"btn-success"
data-bs-dismiss
=
"offcanvas"
aria-label
=
"Close"
>
Close
</
button
>
</
div
>
</
div
>
</
div
>
</
body
>
</
html
>