<button class="to-top">Up</button>
.to-top {
position: fixed;
right: 30px;
bottom: 30px;
width: 40px;
height: 40px;
text-align: center;
font-size: 0;
z-index: 50;
opacity: .7;
color: #000;
background-color: orange;
transition: all 0.25s;
transform: translateX(100px);
}
.to-top::before {
content: "";
width: 14px;
height: 14px;
border: 2px solid #000;
border-left: 0;
border-bottom: 0;
ransform: rotate(-45deg);
position: absolute;
top: 16px;
left: 13px;
}
.to-top.active {
transform: translateX(0);
}
.to-top:hover {
opacity: 1;
}
$('.to-top').on('click', function() {
$('body, html').animate({ scrollTop:0 },800);
return false;
});
$(window).scroll(function() {
if($(this).scrollTop() > 100) {
$('.to-top').addClass('active');
} else {
$('.to-top').removeClass('active');
}
});
@keyframes fadeInUpSD {
0% {
opacity: 0;
transform: translate3d(0,15%,0)
}
100% {
opacity: 1;
transform: translate3d(0,0,0)
}
}
.hero-slider .slick-active .hero-title.ajat-animated {
animation: fadeInUpSD 1s both 1s
}
.hero-slider .slick-active .hero-list.ajat-animated {
animation: fadeInUpSD 1s both 1.5s
}
<div class="img-wrapper">
<img src="img/category/cat3.jpg" alt="">
</div>
.img-wrapper {
position: relative;
}
.img-wrapper::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
.page-header {
position: fixed;
top: 0;
left: 0;
right: 0;
padding: 20px 0;
background-color: #292929;
transition: padding .25s;
z-index: 100;
}
.page-header.scroll {
padding: 10px 0;
background-color: #fff;
box-shadow: 0 5px 15px rgba(0,0,0,.05);
}
.page-header.scroll .main-menu a {
color: #292929;
}
.page-header.scroll .main-menu a:hover {
color: #06bbc7;
}
.main-menu a {
color: #e5e5e5;
}
.main-menu a:hover {
color: #06bbc7;
}