jquery+css实现文章底部滚动章节导航效果代码
代码语言:html
所属分类:菜单导航
代码描述:jquery+css实现文章底部滚动章节导航效果代码,页面滚动,底部进度条调到响应章节上。
代码标签: jquery css 文章 底部 滚动 章节 导航
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
@import url(https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700,300italic);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,700,800);
@import url(https://fonts.googleapis.com/css?family=Lora:400,400italic,700,700italic);
@import url(https://fonts.googleapis.com/css?family=Unica+One);
body {
background-color: #2E334A;
font-family: 'Lora', serif;
margin: 0px;
color: #B7B8BF;
}
a:link {
text-decoration: none;
color: #f15a24;
}
a:hover {
text-decoration: none;
color: #f15a24;
}
h1 {
font-family: 'Open Sans Condensed';
text-transform: uppercase;
font-weight: 700;
font-size: 50px;
margin-bottom: 0px;
margin-top: 50px;
color: #8EC9D2;
line-height: 45px;
}
h3 {
font-weight: 400;
margin-top: 0px;
font-style: oblique;
font-size: 24px;
margin-bottom: 25px;
color: #8EC9D2;
}
p {
margin-bottom: 50px;
}
.intro {
font-family: 'Unica One';
color: #f15a24;
}
.container {
max-width: 500px;
margin: auto;
padding: 50px;
}
.footer-scroller {
position: fixed;
bottom: 0;
background-color: #272b3f;
width: 100%;
height: 60px;
overflow-x: scroll;
margin: 0px;
}
.section {
background-color: #8EC9D2;
color: #2E334A;
width: 75px;
height: 75px;
display: flex;
justify-content: center;
align-items: center;
float: left;
position: relative;
font-family: 'Open Sans';
font-weight: 800;
font-size: 28px;
line-height: 28px;
margin-right: 10px;
}
.hipsum {
font-size: 18px;
line-height: 28px;
font-style: oblique;
margin-bottom: 200px;
}
.mover-bar {
height: 100%;
border-right:4px solid #f15a24;
width: 0px;
float: left;
z-index:100;
position: absolute;
-webkit-transition: left 5s;
transition: left 1s;
}
.liner {
float: left;
position: relative;
width: 45%;
height: 50%;
border-bottom: 1px dotted yellow;
}
.bar-section {
float: left;
position: relative;
width: 200px;
height: 60px;
border-right: 1px dotted #B7B8BF;
transition-property: background-color;
transition-duration: 1s;
transition-timing-function: linear;
}
.number {
background-color: #1b1e2c;
font-size: 12px;
color: #B7B8BF;
width: 40px;
display: inline-block;
text-align: center;
font-family: 'Unica One';
margin: 3px;
padding: 3px;
font-weight: 700;
letter-spacing: 2px;
text-transform: uppercase;
box-shadow: inset 0 -6px 0 #f15a24;
border-bottom: 0px solid #f15a24;
transition: all .2s;
}
.number:hover {
background-color: #8EC9D2;
color: #2E334A;
}
@media screen and (max-width : 768px)
{
.number { display: none; }
}
</style>
</head>
<body>
<!-- partial:index.partial.html -->
<div class="container">
<div class="header">
<h1>Slidey</h1>
<h3>a progress navigator bar</h3>
</div>
<div class="hipsum">
<p id="section0">
<div class="section">0</div><span class="intro">Chapter 0:</span> When you scroll down the page, the bar on the bottom of the page moves the amount you have read, from section to section. When you finish a section, the section at the bottom of the page changes
color, indicating that you've read the sectio.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0