jquery实现带滚动进度的返回顶部按钮效果代码
代码语言:html
所属分类:加载滚动
代码描述:jquery实现带滚动进度的返回顶部按钮效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.4.3.1.min.css">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/unicons.css">
<style>
/* Please ❤ this if you like it! */
@import url('https://fonts.googleapis.com/css?family=Muli:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i&subset=latin-ext,vietnamese');
@import url('https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i&subset=latin-ext');
:root {
font-size: 20px;
--red: #da2c4d;
--yellow: #f8ab37;
--green: #2ecc71;
--white: #ffffff;
--grey-light: #f2f7f9;
--grey: #ecedf3;
--black: #080808;
--black-blue: #1f2029;
--black-blue-light: #353746;
--black-blue-light-2: #404255;
--black-blue-light-3: #4b4d64;
--black-light: #424455;
}
body{
font-family: 'Raleway', sans-serif;
font-size: 16px;
font-weight: 500;
line-height: 1.65;
color: var(--grey);
background-color: var(--black-blue);
overflow-x: hidden;
letter-spacing: 0.2px;
-webkit-transition: all 200ms linear;
transition: all 200ms linear;
text-rendering: optimizeLegibility !important;
-webkit-font-smoothing: antialiased !important;
}
body.light{
color: var(--black-light);
}
h1{
font-family: 'Muli', sans-serif;
font-size: 12vw;
font-weight: 900;
line-height: 1;
color: var(--white);
-webkit-transition: all 200ms linear;
transition: all 200ms linear;
}
body.light h1{
color: var(--black);
}
body.light{
background-color: var(--white);
}
.navbar-brand{
height: 36px;
position: fixed;
top: 50px;
left: 70px;
z-index: 3333;
width: auto;
display: inline-block;
margin: 0;
padding: 0;
-webkit-transition : all 0.3s ease-out;
transition : all 0.3s ease-out;
}
.navbar-brand::before{
position: absolute;
content: '';
top: -13px;
left: 50%;
width: 80px;
transform: translateX(-50%);
height: calc(100% + 26px);
opacity: 0;
z-index: -1;
background-image: linear-gradient(260deg, var(--grey), var(--grey-light));
animation: border-transform 10s linear infinite alternate forwards;
-webkit-transition: all 200ms linear;
transition: all 200ms linear;
}
.navbar-brand::after{
position: absolute;
content: '';
top: -13px;
left: 50%;
width: 80px;
transform: translateX(-50%);
height: calc(100% + 26px);
opacity: 1;
z-index: -1;
background-image: linear-gradient(160deg, var(--black-blue-light-3), var(--black-blue-light));
animation: border-transform 10s linear infinite alternate forwards;
-webkit-transition: all 200ms linear;
transition: all 200ms linear;
}
.navbar-brand img{
padding: 7px 0;
height: 100%;
width: auto;
display: block;
-webkit-transition : all 0.3s ease-out;
transition : all 0.3s ease-out;
}
@-webkit-keyframes border-transform{
0%,100% { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
14% { border-radius: 40% 60% 54% 46% / 49% 60% 40% 51%; }
28% { border-radius: 54% 46% 38% 62% / 49% 70% 30% 51%; }
42% { border-radius: 61% 39% 55% 45% / 61% 38% 62% 39%; }
56% { border-radius: 61% 39% 67% 33% / 70% 50% 50% 30%; }
70% { border-radius: 50% 50% 34% 66% / 56% 68% 32% 44%; }
84% { border-radius: 46% 54% 50% 50% / 35% 61% 39% 65%; }
}
@keyframes border-transform{
0%,100% { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
14% { border-radius: 40% 60% 54% 46% / 49% 60% 40% 51%; }
28% { border-radius: 54% 46% 38% 62% / 49% 70% 30% 51%; }
42% { border-radius: 61% 39% 55% 45% / 61% 38% 62% 39%; }
56% { border-radius: 61% 39% 67% 33% / 70% 50% 50% 30%; }
70% { border-radius: 50% 50% 34% 66% / 56% 68% 32% 44%; }
8.........完整代码请登录后点击上方下载按钮下载查看
网友评论0