I'm currently working on creating touch scrollable tabs using Bootstrap 4, specifically for mobile view. I attempted to modify a Bootstrap 3 code snippet found at to work with Bootstrap version 4.
You can find the Codepen demo here: https://codepen.io/Bizboss/pen/zYGEOjO
Here's the HTML structure:
<div class="container">
<div class="row">
<div class="col">
<!-- Nav tabs -->
<div class="card">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Home</a></li>
<li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li>
<li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li>
<li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li>
<li role="presentation"><a href="#about" aria-controls="about" role="tab" data-toggle="tab">About</a></li>
<li role="presentation"><a href="#contact" aria-controls="contact" role="tab" data-toggle="tab">Contacts</a></li>
</ul>
<div class="tab-content">
<!-- Tab panes content goes here -->
</div>
</div>
</div>
For the CSS styling, you can refer to the following snippet:
/* Custom CSS styles go here */
body {
background: #EDECEC;
}
/* More custom styles */
@keyframes example {
/* Your keyframe animation goes here */
}
If you have any suggestions or solutions on how to make this work properly, please feel free to share them!