"ViccoMenu 3"
Bootstrap 4.1.1 Snippet by ayhncalik

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="wrapper">
<nav class="tabs">
<div class="selector"></div>
<a href="#" class="active"><i class="fab fa-superpowers"></i>Yeni Sezon</a>
<a href="#"><i class="fas fa-hand-rock"></i>Kız</a>
<a href="#"><i class="fas fa-bolt"></i>Erkek</a>
<a href="#"><i class="fas fa-burn"></i>Aksesuar</a>
<a href="#"><i class="fas fa-burn"></i>Fırsat Garajı</a>
<a href="#"><i class="fas fa-burn"></i>Toledo</a>
</nav>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@import url('https://fonts.googleapis.com/css?family=Roboto');
body{
font-family: 'Roboto', sans-serif;
}
h2{
margin:0px;
text-transform: uppercase;
}
h6{
margin:0px;
color:#777;
}
.wrapper{
text-align:center;
margin:50px auto;
}
.tabs{
margin-top:50px;
font-size:15px;
padding:0px;
list-style:none;
background:#fff;
box-shadow:0px 5px 20px rgba(0,0,0,0.1);
display:inline-block;
border-radius:50px;
position:relative;
}
.tabs a{
text-decoration:none;
color: #777;
text-transform:uppercase;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var tabs = $('.tabs');
var selector = $('.tabs').find('a').length;
//var selector = $(".tabs").find(".selector");
var activeItem = tabs.find('.active');
var activeWidth = activeItem.innerWidth();
$(".selector").css({
"left": activeItem.position.left + "px",
"width": activeWidth + "px"
});
$(".tabs").on("click","a",function(e){
e.preventDefault();
$('.tabs a').removeClass("active");
$(this).addClass('active');
var activeWidth = $(this).innerWidth();
var itemPos = $(this).position();
$(".selector").css({
"left":itemPos.left + "px",
"width": activeWidth + "px"
});
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: