Bootstrap 4
Mobile Mode Scroll Menu
Three Slider Mode in Swipper Js
Bootstrap 4
Introduction
Get started with Bootstrap the world’s most popular framework for building responsive website, mobile first sites, with BootstrapCDN and a file starter page.
Mobile Mode Scroll Menu
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Navbar Menu</title>
<link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css” rel=”stylesheet” integrity=”sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC” crossorigin=”anonymous”>
<style>
header.secondary-nav .scroll {
white-space: nowrap;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar;
}
header.secondary-nav .scroll::-webkit-scrollbar {
display: none;
}
header.secondary-nav .submenu {
display: none;
position: absolute;
left: 0;
top: 100%;
width: 100%;
height: 0;
clear: both;
background-color: #fbf7fc;
box-shadow: 0 .3rem .3rem rgba(0, 0, 0, .15)!important;
}
header.secondary-nav .submenu.visible {
display: block;
height: auto;
border-top: 1px solid #e8e8e8;
}
header.secondary-nav .dropdown {
position: inherit;
}
header.secondary-nav .dropdown-item {
display: inline-block;
font-size: 0.8rem;
font-weight: 500;
width: auto;
clear: inherit;
padding: 12px;
}
header.secondary-nav .dropdown-toggle.visible {
background: #fbf7fc;
}
header.secondary-nav .dropdown-item.active,
header.secondary-nav .dropdown-item:active,
header.secondary-nav .dropdown-item:hover {
background: #fff;
color: #6a2c79;
}
/*Don’t Remove this give class/id if required*/
header.secondary-nav,
header.secondary-nav nav {
font-size: 0;
}
header.secondary-nav {
background-color: #fff;
position: relative;
z-index: 2;
clear: both;
width: 100%;
/* Force Hardware Acceleration */
-webkit-transform: translateZ(0);
transform: translateZ(0);
will-change: transform;
-webkit-transition: -webkit-transform 0.5s;
transition: -webkit-transform 0.5s;
transition: transform 0.5s;
}
header.secondary-nav .vam {
display: inline-block;
vertical-align: middle;
}
header.secondary-nav .nav {
width: 100%;
}
header.secondary-nav .nav-item {
display: inline-block;
vertical-align: middle;
}
header.secondary-nav .nav-link {
padding: 18px 14px;
font-size: 0.82rem;
font-weight: 600;
transition: color 0.1s, border-bottom 0.1s
}
@media (max-width: 768px) {
header.secondary-nav::after {
content: ”;
position: absolute;
z-index: 1;
top: 0;
right: 0;
height: 100%;
width: 35px;
background: linear-gradient(to left, #e3e3e3, rgba(37, 40, 61, 0));
pointer-events: none;
transition: opacity 0.2s;
}
header.secondary-nav .nav-link {
padding: 14px 10px;
}
}
header.secondary-nav .nav-link.active {
color: #000;
box-shadow: inset 0px -3px 0px 0px #fdac00;
}
header.secondary-nav .nav-link:hover {
color: #6a2c79;
border-bottom: 2px solid #6a2c79;
}
</style>
</head>
<body data-spy=”scroll” data-target=”#secondary-nav” data-offset=”55″>
<header id=”secondary-nav” class=”secondary-nav shadow-sm position-sticky” style=”top:0;”>
<div class=”container”>
<nav class=”vam nav scroll dragger scroller”>
<li class=”nav-item dropdown”>
<a href=”#” class=”nav-link dropdown-toggle” data-id=”overview” aria-controls=”overview”>Overview</a>
<div id=”overview” class=”submenu”>
<div class=”container scroll dragger scroller”>
<a class=”dropdown-item” href=”#fat”>Project Summary</a>
<a class=”dropdown-item” href=”#two”>Construction Phases</a>
<a class=”dropdown-item” href=”#three”>Amenities</a>
<a class=”dropdown-item” href=”#”>Specifications</a>
</div>
</div>
</li>
<li class=”nav-item”><a href=”#mdo” class=”nav-link”>Floor Plans & Pricing</a></li>
<li class=”nav-item”><a href=”#one” class=”nav-link”>Location</a></li>
<li class=”nav-item”><a href=”#three” class=”nav-link”>Resale/Investor Flats</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Home Loan</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item dropdown”>
<a href=”#” class=”nav-link dropdown-toggle” data-id=”more” aria-controls=”more”>More</a>
<div id=”more” class=”submenu”>
<div class=”container scroll dragger scroller” aria-labelledby=”more”>
<a class=”dropdown-item” href=”#”>Similar Projects</a>
<a class=”dropdown-item” href=”#”>Discussions</a>
<a class=”dropdown-item” href=”#”>Reviews</a>
<a class=”dropdown-item” href=”#”>Report Error</a>
</div>
</div>
</li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
<li class=”nav-item”><a href=”#” class=”nav-link”>Developer</a></li>
</nav>
</div>
</header>
<script src=”https://code.jquery.com/jquery-3.7.0.js” integrity=”sha256-JlqSTELeR4TLqP0OG9dxM7yDPqX1ox/HfgiSLBj8+kM=” crossorigin=”anonymous”></script>
<script>
</script>
</body>
</html>
Three Slider Mode in Swipper Js
<link rel=”stylesheet” href=”https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.css”>
<script src=”https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.js”></script>
<style>
.sample-slider{
width:70%;
}
.sample-slider img{
width: 100%;
}
</style>
<div class=”swiper sample-slider”>
<div class=”swiper-wrapper”>
<div class=”swiper-slide”><img src=”img/banner2.jpg”></div>
<div class=”swiper-slide”><img src=”img/banner3.jpg”></div>
<div class=”swiper-slide”><img src=”img/banner4.jpg”></div>
<div class=”swiper-slide”><img src=”img/banner2.jpg”></div>
<div class=”swiper-slide”><img src=”img/banner3.jpg”></div>
<div class=”swiper-slide”><img src=”img/banner4.jpg”></div>
</div>
<div class=”swiper-pagination”></div>
<div class=”swiper-button-prev”></div>
<div class=”swiper-button-next”></div>
</div>
<script>
const swiper = new Swiper(‘.sample-slider’, {
loop: true,
slidesPerView: 2,
centeredSlides : true,
spaceBetween: 20, //added
autoplay: {
delay: 2000,
},
pagination: {
el: ‘.swiper-pagination’,
},
navigation: {
nextEl: “.swiper-button-next”,
prevEl: “.swiper-button-prev”,
},
})
</script>