Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="mb-5 text-muted">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eu ipsum finibus, rhoncus nisl vitae, tincidunt mauris. Curabitur sagittis aliquet leo, nec porttitor enim auctor ut. Donec in eros ac mi efficitur gravida id nec erat. Aliquam ultrices eros a mauris accumsan, ut elementum odio congue. Sed et pulvinar risus. Morbi vitae dolor consequat orci pellentesque iaculis. Nullam laoreet maximus sem, in 
</div>


<div class="mb-5" id="app">
	<p class="alert alert-primary">Use mousewheel to scroll the tabs while preventing vertical page scroll</p>
	
	<!-- Nav tabs -->
	<ul class="nav nav-pills flex-nowrap" id="myTab" role="tablist">
		<li class="nav-item" role="presentation">
			<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a>
		</li>
		<li class="nav-item" role="presentation">
			<a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Profile</a>
		</li>
		<li class="nav-item" role="presentation">
			<a class="nav-link" id="messages-tab" data-toggle="tab" href="#messages" role="tab" aria-controls="messages" aria-selected="false">Messages</a>
		</li>
		<li class="nav-item" role="presentation">
			<a class="nav-link" id="settings-tab" data-toggle="tab" href="#settings" role="tab" aria-controls="settings" aria-selected="false">Settings</a>
		</li>
			<li class="nav-item" role="presentation">
			<a class="nav-link" id="settings-tab" data-toggle="tab" href="#settings" role="tab" aria-controls="settings" aria-selected="false">Settings</a>
		</li>
			<li class="nav-item" role="presentation">
			<a class="nav-link" id="settings-tab" data-toggle="tab" href="#settings" role="tab" aria-controls="settings" aria-selected="false">Settings</a>
		</li>
			<li class="nav-item" role="presentation">
			<a class="nav-link" id="settings-tab" data-toggle="tab" href="#settings" role="tab" aria-controls="settings" aria-selected="false">Settings</a>
		</li>
			<li class="nav-item" role="presentation">
			<a class="nav-link" id="settings-tab" data-toggle="tab" href="#settings" role="tab" aria-controls="settings" aria-selected="false">Settings</a>
		</li>
	</ul>

	<!-- Tab panes -->
	<div class="tab-content py-3">
		<div class="tab-pane active" id="home" role="tabpanel" aria-labelledby="home-tab">
			Ut laoreet, tellus ornare suscipit pharetra, dolor nisl fringilla ligula, id eleifend leo sapien sit amet enim. Nunc volutpat fermentum nunc, vitae laoreet ligula aliquet nec. Vivamus ullamcorper eget nulla mattis fermentum. Duis iaculis bibendum risus non imperdiet. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras ullamcorper enim elit, ac interdum eros facilisis feugiat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
		</div>
		<div class="tab-pane" id="profile" role="tabpanel" aria-labelledby="profile-tab">2</div>
		<div class="tab-pane" id="messages" role="tabpanel" aria-labelledby="messages-tab">3</div>
		<div class="tab-pane" id="settings" role="tabpanel" aria-labelledby="settings-tab">4</div>
	</div>
</div>

<p class="text-muted">
Vivamus suscipit at purus sed aliquet. Praesent gravida lectus eget enim varius scelerisque. Maecenas faucibus, neque nec consequat mollis, sapien libero pellentesque elit, et iaculis dui lorem ut dolor. Duis a leo in est consectetur vestibulum accumsan ac nunc. Vestibulum lectus eros, commodo a metus nec, sollicitudin mollis lectus. Maecenas et sapien eu nunc tempor egestas quis eget diam. Aliquam venenatis nulla eget aliquet posuere. Quisque efficitur non mauris ut sollicitudin.

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur a tristique diam. Donec rhoncus ante lorem, non dapibus erat iaculis vehicula. Phasellus justo turpis, consectetur in nisi eget, tincidunt dictum mi. Donec venenatis nunc eget felis tempor lacinia. Pellentesque a tincidunt leo. In tincidunt ligula eu efficitur sagittis. Aenean convallis sit amet arcu non dapibus.

Maecenas lobortis dignissim dignissim. Donec sollicitudin lorem ex. Integer non sem lobortis, rutrum orci finibus, condimentum elit. Phasellus ac felis eu arcu pretium finibus. Nulla vestibulum, odio sed imperdiet aliquet, est nulla sodales urna, lacinia facilisis turpis arcu in erat. Aliquam eu condimentum nulla, ut ultricies arcu. Duis vel ultricies enim. Ut in cursus elit. Sed tincidunt ac lectus in feugiat. Maecenas sit amet varius metus.

Nullam varius posuere nibh, vel faucibus est tristique et. Nam luctus velit nec lorem dictum ultrices. Donec fermentum nunc at nisl pulvinar, vel aliquam ligula rutrum. Integer euismod eu enim at consectetur. Phasellus vestibulum odio ante, id pharetra elit scelerisque et. Cras neque quam, rutrum quis semper nec, luctus et erat. Ut eget ipsum in orci pretium pulvinar.

Vestibulum euismod facilisis turpis, nec tincidunt ex. Aliquam lacinia blandit placerat. Cras quis vehicula nibh. Proin bibendum nisi at elementum accumsan. Maecenas sodales faucibus enim, et vulputate diam viverra sed. Phasellus congue placerat orci, eu imperdiet augue ultricies sit amet. Morbi ligula sapien, porta nec est a, venenatis bibendum nulla. Etiam efficitur tellus vitae diam bibendum posuere.

Morbi a nulla lectus. Vestibulum tellus lorem, feugiat id rutrum a, fermentum eget risus. Nunc convallis ac ipsum vel tincidunt. Proin maximus, arcu imperdiet luctus viverra, velit lectus porttitor ante, vel bibendum odio felis vitae orci. Mauris vel dui sit amet lectus vehicula pulvinar. Morbi efficitur venenatis pretium. Duis sed magna id diam posuere tincidunt. Nunc ac turpis a diam pretium luctus. Phasellus placerat felis ipsum, id pretium odio hendrerit at. Vestibulum interdum, purus non fermentum pellentesque, neque velit rhoncus justo, eget mattis augue nisi rutrum erat. Suspendisse ac ligula eleifend, facilisis purus eu, convallis risus. Vivamus scelerisque augue orci, a aliquam urna sollicitudin a. Aliquam consectetur porta velit, id pharetra arcu porta eget. Interdum et malesuada fames ac ante ipsum primis in faucibus. Morbi urna ligula, volutpat id nisi molestie, laoreet vestibulum nunc. Morbi sem lacus, posuere id suscipit sit amet, mollis quis orci.</p>
              
            
!

CSS

              
                .nav{
	
	&::after{
    content: ' ';
    display: block;
    background-color: #fff;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 26%);
    width: 50px;
    position: sticky;
    right: 0;
    bottom: 0;
    top: 0;
    left: 20px;
    min-width: 61px; /* important */
	}
	
	--scrollbarBG: transparent;
	--thumbBG: #eee;
	
	&:hover{
		--thumbBG: #e0e0e0;

	}
	
	position: relative;
	overflow-x: scroll;
	padding-bottom:3px;
	scrollbar-width: thin;
	scrollbar-color: var(--thumbBG) var(--scrollbarBG);
	
	&::-webkit-scrollbar {
		width: 1px;
		height: 1px;
	}

	&::-webkit-scrollbar-track {
		background: var(--scrollbarBG);
	}
	&::-webkit-scrollbar-thumb {
		background-color: var(--thumbBG) ;
		border-radius: 2px;
	}
}

body{
	margin:20px;
}
#app {
	max-width:500px;
	margin:auto;
}
              
            
!

JS

              
                var app = new Vue({
		el: '#app', 
		
		mounted: function() {
			document.querySelector('#myTab').addEventListener('mousewheel', (e) => {
				document.querySelector('#myTab').scrollLeft = document.querySelector('#myTab').scrollLeft + e.deltaY;
				e.preventDefault();
				e.stopPropagation();
				return false;
			});
		},
});
              
            
!
999px

Console