html页面滚动元素移动,实现桌面和移动浏览器元素随页面滚动产生动画
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
实现桌面和移动浏览器元素随页面滚动产生动画的js插件
document.documentElement.classList.add('js-enabled');
body, html { font-size: 100%; padding: 0; margin: 0;}
/* Reset */
*,
*:after,
*:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* Clearfix hack by Nicolas Gallagher: http://nicolasgallagher.com/micro-clearfix-hack/ */
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
body{
background: #494A5F;
overflow-x:hidden;
color: #D5D6E2;
font-weight: 500;
font-size: 1.05em;
font-family: "Microsoft YaHei","宋体","Segoe UI", "Lucida Grande", Helvetica, Arial,sans-serif, FreeSans, Arimo;
}
a{color: #2fa0ec;text-decoration: none;outline: none;}
a:hover,a:focus{color:#74777b;}
.htmleaf-container{
margin: 0 auto;
text-align: center;
overflow: hidden;
}
.htmleaf-content {
font-size: 150%;
padding: 1em 0;
}
.htmleaf-content h2 {
margin: 0 0 2em;
opacity: 0.1;
}
.htmleaf-content p {
margin: 1em 0;
padding: 5em 0 0 0;
font-size: 0.65em;
}
.bgcolor-1 { background: #f0efee; }
.bgcolor-2 { background: #f9f9f9; }
.bgcolor-3 { background: #e8e8e8; }/*light grey*/
.bgcolor-4 { background: #2f3238; color: #fff; }/*Dark grey*/
.bgcolor-5 { background: #df6659; color: #521e18; }/*pink1*/
.bgcolor-6 { background: #2fa8ec; }/*sky blue*/
.bgcolor-7 { background: #d0d6d6; }/*White tea*/
.bgcolor-8 { background: #3d4444; color: #fff; }/*Dark grey2*/
.bgcolor-9 { background: #ef3f52; color: #fff;}/*pink2*/
.bgcolor-10{ background: #64448f; color: #fff;}/*Violet*/
.bgcolor-11{ background: #3755ad; color: #fff;}/*dark blue*/
.bgcolor-12{ background: #3498DB; color: #fff;}/*light blue*/
.bgcolor-20{ background: #494A5F;color: #D5D6E2;}
.mt50{margin-top: 50px;}
/* Header */
.htmleaf-header{
padding: 1em 190px 1em;
letter-spacing: -1px;
text-align: center;
background: #66677c;
}
.htmleaf-header h1 {
color: #D5D6E2;
font-weight: 600;
font-size: 2em;
line-height: 1;
margin-bottom: 0;
font-family: "Microsoft YaHei","宋体","Segoe UI", "Lucida Grande", Helvetica, Arial,sans-serif, FreeSans, Arimo;
}
.htmleaf-header h1 span {
font-family: "Microsoft YaHei","宋体","Segoe UI", "Lucida Grande", Helvetica, Arial,sans-serif, FreeSans, Arimo;
display: block;
font-size: 60%;
font-weight: 400;
padding: 0.8em 0 0.5em 0;
color: #c3c8cd;
}
/*nav*/
.htmleaf-demo a{color: #fff;text-decoration: none;}
.htmleaf-demo{width: 100%;padding-bottom: 1.2em;}
.htmleaf-demo a{display: inline-block;margin: 0.5em;padding: 0.6em 1em;border: 3px solid #fff;font-weight: 700;}
.htmleaf-demo a:hover{opacity: 0.6;}
.htmleaf-demo a.current{background:#1d7db1;color: #fff; }
/* Top Navigation Style */
.htmleaf-links {
position: relative;
display: inline-block;
white-space: nowrap;
font-size: 1.5em;
text-align: center;
}
.htmleaf-links::after {
position: absolute;
top: 0;
left: 50%;
margin-left: -1px;
width: 2px;
height: 100%;
background: #dbdbdb;
content: '';
-webkit-transform: rotate3d(0,0,1,22.5deg);
transform: rotate3d(0,0,1,22.5deg);
}
.htmleaf-icon {
display: inline-block;
margin: 0.5em;
padding: 0em 0;
width: 1.5em;
text-decoration: none;
}
.htmleaf-icon span {
display: none;
}
.htmleaf-icon:before {
margin: 0 5px;
text-transform: none;
font-weight: normal;
font-style: normal;
font-variant: normal;
font-family: 'icomoon';
line-height: 1;
speak: none;
-webkit-font-smoothing: antialiased;
}
/* footer */
.htmleaf-footer{width: 100%;padding-top: 10px;}
.htmleaf-small{font-size: 0.8em;}
.center{text-align: center;}
/****/
.related {
color: #fff;
background: #494A5F;
text-align: center;
font-size: 1.25em;
padding: 0.5em 0;
overflow: hidden;
}
.related > a {
vertical-align: top;
width: calc(100% - 20px);
max-width: 340px;
display: inline-block;
text-align: center;
margin: 20px 10px;
padding: 25px;
font-family: "Microsoft YaHei","宋体","Segoe UI", "Lucida Grande", Helvetica, Arial,sans-serif, FreeSans, Arimo;
}
.related a {
display: inline-block;
text-align: left;
margin: 20px auto;
padding: 10px 20px;
opacity: 0.8;
-webkit-transition: opacity 0.3s;
transition: opacity 0.3s;
-webkit-backface-visibility: hidden;
}
.related a:hover,
.related a:active {
opacity: 1;
}
.related a img {
max-width: 100%;
opacity: 0.8;
border-radius: 4px;
}
.related a:hover img,
.related a:active img {
opacity: 1;
}
.related h3{font-family: "Microsoft YaHei", sans-serif;}
.related a h3 {
font-weight: 300;
margin-top: 0.15em;
color: #fff;
}
/* icomoon */
.icon-htmleaf-home-outline:before {
content: "\e5000";
}
.icon-htmleaf-arrow-forward-outline:before {
content: "\e5001";
}
@media screen and (max-width: 50em) {
.htmleaf-header {
padding: 3em 10% 4em;
}
.htmleaf-header h1 {
font-size:2em;
}
}
@media screen and (max-width: 40em) {
.htmleaf-header h1 {
font-size: 1.5em;
}
}
@media screen and (max-width: 30em) {
.htmleaf-header h1 {
font-size:1.2em;
}
}
.js-enabled .fooReveal { visibility: hidden; }
.fooContainer { perspective: 800px; }
默认
3D效果
window.sr = ScrollReveal();
sr.reveal( '.fooReveal', { rotate: {x: 65},reset:true } );
哈哈,有好的有用的源码我会在和大家分享,大家也可以关注H5EDU
html页面滚动元素移动,实现桌面和移动浏览器元素随页面滚动产生动画相关推荐
- html网页跟随滚轮变化,实现桌面和移动浏览器元素随页面滚动产生动画
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 实现桌面和移动浏览器元素随页面滚动产生动画的js插件 document.documentElement.classList.add('js-enabled ...
- html页面元素跟随屏幕,实现桌面和移动浏览器元素随页面滚动产生动画
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 实现桌面和移动浏览器元素随页面滚动产生动画的js插件 document.documentElement.classList.add('js-enabled ...
- php如何禁用浏览器的缓存,php如何禁止浏览器使用缓存页面
[摘要] PHP即"超文本预处理器",是一种通用开源脚本语言.PHP是在服务器端执行的脚本语言,与C语言类似,是常用的网站编程语言.PHP独特的语法混合了C.Java.Perl以及 ...
- 当前元素_90行代码,15个元素实现无限滚动
前言 在本篇文章你将会学到: IntersectionObserver API 的用法,以及如何兼容. 如何在React Hook中实现无限滚动. 如何正确渲染多达10000个元素的列表. 无限下拉加 ...
- scrolltop 原生js_解决js页面滚动效果scrollTop在FireFox与Chrome浏览器间的兼容问题的方法...
最近在做博客的目录功能,发现一个在现代浏览器间的一个bug,或是称之为差异,即页面滚动值(scrollTop)的获取与设定. 在此之前先说一下关于页面元素的坐标获取,这张图的经典性不必再提. 实现滚动 ...
- 实现在页面上隐藏某个元素的css,有趣的css—隐藏元素的7种思路
display.visibility.opacity三个属性隐藏元素之间的异同点一直是前端面试面试的常考题. 除了display.visibility.opacity三个属性可以隐藏元素之外,是否还存 ...
- 解决IE6,IE7下子元素使用position:relative、父元素使用overflow:auto后,子元素不随着滚动条滚动的问题...
解决IE6,IE7下子元素使用position:relative.父元素使用overflow:auto后,子元素不随着滚动条滚动的问题 在IE6,IE7下,子元素使用position:relative ...
- python获取当前网页元素_Python+Selenium练习(三十)- 获取页面元素的href属性
目标:通过Selenium获取页面元素的某一个属性.一个元素可能有多个属性,例如class,id,name,text,href,value等. 练习场景:找出当前页面的所有超链接.例:打印出百度首页所 ...
- 安卓版PDA扫码获取扫描枪数据;input获取焦点不弹出虚拟键盘;解决页面btn可操作数据的逻辑,导致DOM元素渲染,input的readonly失效
html部分: 页面需要一个容器来接收扫描数据 注意:安卓版PDA扫描不同于win系统版本,安卓版本获取扫描数据时并不是keyCode按键依次获取,而是一次性给出扫描的数据 <!--扫描枪数据接 ...
最新文章
- oracle mysql事物隔离级别_Oracle数据库事物隔离级别
- Github标星57k+,热榜第一,用Python实现所有算法
- linux下查看vnc端口_怎样查vnc端口,Linux下根据进程名怎样查端口
- AttributeError: 'PyQt5.QtCore.pyqtSignal' object has no attribute 'connect'
- LeetCode18.四数之和 JavaScript
- c#小游戏_C#小游戏—钢铁侠VS太空侵略者
- Java方法中的参数太多,第8部分:工具
- 小白也可以玩转的炫酷大屏!
- c语言一元二次方程代码,一元二次方程求解程序完整代码
- # 2017-2018-1 20155336《信息安全技术》实验二——Windows口令破解
- java 微信导航栏_微信小程序教程系列之设置标题栏和导航栏
- 数据库知识点汇总(最全!!)
- linux终端文件保存,Linux 终端中命令输出保存到文件中的方法
- 矩阵乘法的计算复杂度
- KGAT: Knowledge Graph Attention Network forRecommendation
- h3c s5820交换机_简单配置
- 打破硬件内卷:荣耀开启高端旗舰手机智慧新赛道
- 冰雪之城鸿蒙碎片,冰雪之城地图推荐:
- 100天精通Python(进阶篇)——第34天:正则表达式大总结(基础+代码实战)
- JMeter学习-005-JMeter 配置元件实例之 - CSV Data Set Config 参数化配置
热门文章
- 数据告诉你:那些成功出道的男团女团,现在怎么样了
- 【闪电侠学netty】第8章 客户端与服务端通信协议编解码
- appium使用 自动化测试
- 面向数据架构的云演变
- 这本对我影响最大的书,想与你分享!
- Qt系列文章001-Qt下载安装
- springboot项目打包时提示“程序包xxx不存在,找不到符号
- 官方文档 android ios,Android 和 IOS 办公文件 doc,docx,ppt pdf 文件查看
- Go 带缓冲的Reader读文件、一次性读取文件
- JavaFx TableView 自动调整列宽,列宽以百分比设置。