<style>
.t395__wrapper {
display: flex;
flex-wrap: wrap;
justify-content: center; /* center центр - flex-start слева - flex-end справа */
}
.t395__title {
line-height: 0.8;
}
.t395__tab {
box-shadow: inset 0 0 0 1px #cecece; /*Контур вкладки*/
border-radius: 30px;
margin-right: 15px; /*left - отступ слева*/
margin-top: 5px;
margin-bottom: 15px;
display: inline-block;
width: fit-content;
}
.t395__tab_active {
box-shadow: 0 0 0 1px #a2a2a2; /*Контур активной вкладки*/
}
@media screen and (max-width: 960px){
.t395__wrapper_mobile {display: none}
.t395__wrapper {
justify-content: flex-start; /* center центр - flex-start слева - flex-end справа */
}
.t395__title {
font-size: 10px !important;
line-height: 0.5;
}
.t395__tab {
margin-right: 10px; /*left - отступ слева*/
margin-bottom: 10px;
}
}
</style>
<style>
@media screen and (max-width:9000px){
.t395__col {overflow-x: auto}
div.t395__wrapper {
flex-wrap: nowrap;
width: max-content;
}
.t395 ::-webkit-scrollbar-thumb {
background: #bfbfbf;
border-radius: 5px;
}
.t395 ::-webkit-scrollbar {
width: 4px;
height: 4px;
background: #f0f0f0;
}
.t395__tab{
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.t395__tab:active {
cursor: grab;
}
}
</style>
<script>
(function(){
let speed = 2; //
let scroll = document.querySelector('.t395__col');
let left = 0;
let drag = false;
let coorX = 0;
scroll.addEventListener('mousedown', function(e) {
drag = true;
coorX = e.pageX - this.offsetLeft;
});
document.addEventListener('mouseup', function() {
drag = false;
left = scroll.scrollLeft;
});
scroll.addEventListener('mousemove', function(e) {
if (drag) {
this.scrollLeft = left - (e.pageX - this.offsetLeft - coorX)*speed;
}
});
})();
</script>