- 浏览: 438921 次
- 性别:
- 来自: 广州
文章分类
最新评论
-
ubuntu的疯狂:
推荐一份完整的教程:http://blog.ddlisting ...
Emberjs学习 -
ptz19:
请问,如果把合并前的文件,不要dest 目标目录来。如: js ...
gulp下静态资源的合并、压缩、MD5后缀 -
zhouzq1008:
楼主,还有个问题,<a href="" ...
gulp下静态资源的合并、压缩、MD5后缀 -
zhouzq1008:
感谢楼主,用到了您的代码, 但现在好像有改动 否则会报错:修改 ...
gulp下静态资源的合并、压缩、MD5后缀 -
denverj:
感谢分享~
Emberjs学习
skrollr ( https://github.com/Prinzhorn/skrollr ) 是一个独立的js特效库。使用方法为在 dom元素上直接编写动画的开始、结束,这些“配置参数”最终会由js读取解析。使用的要点:
1. 由于会对元素做CSS3的动画变形,实际的应用中,通常会把元素设置为 position: fixed;或者 absolute;
2. 这样就要求页面的每一个分块都有 height的 CSS控制,从而方便计算。
3. 元素的定位支持paga和viewport两种,具体的参数设置,可以上官方github查看。
1. 由于会对元素做CSS3的动画变形,实际的应用中,通常会把元素设置为 position: fixed;或者 absolute;
2. 这样就要求页面的每一个分块都有 height的 CSS控制,从而方便计算。
3. 元素的定位支持paga和viewport两种,具体的参数设置,可以上官方github查看。
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <link href="fixed-positioning.css" rel="stylesheet" type="text/css" /> <title>Anchors</title> <style type="text/css"> body {font-family:sans-serif;} #content { width:90%; background:#eee; border:1px solid #444; margin:1em auto; } #content > div { padding:1em; } .box { float:left; padding:6em 1em; margin:2px; } p {margin:1em 0;} /* .float-left{ float: left; margin: 0 0 0 20px; } .float-right{ float: right; margin: 0 20px 0 0; } */ .center{ font-size: 2.5em; padding: 80px 0 0 0; text-align: center; } #intro{ background:url(images/firstBG.jpg) 50% -75px no-repeat fixed; color: white; height: 600px; margin: 0 auto; padding: 160px 0 0 0; } #second{ background: url(images/secondBG.jpg) 50% 0 no-repeat fixed; color: white; height: 1300px; margin: 0 auto; overflow: hidden; padding: 0; } #second .bg{ background: url(images/trainers.png) 50% 0 no-repeat fixed; height: 1300px; margin: 0 auto; padding: 0; position: absolute; width: 900px; } #third{ background: url(images/thirdBG.jpg) 50% 0 no-repeat fixed; color: white; height: 650px; padding: 100px 0 0 0; } .story{ margin: 0 auto; min-width: 980px; overflow: auto; width: 980px; } #nav{ list-style: none; position: fixed; right: 20px; z-index: 999; } #nav li{ margin: 0 0 15px 0; } #nav li a { display: block; width: 10px; height: 10px; border-radius: 10px; background-color: white; border: solid 2px white; } #nav li a.current { background-color: orange; } /*.skrollable{position:absolute !important;}*/ .slide h2 {top:25%;} .slide .desc {top:0%; width:600px;} h1{color:blue;} #content h1{top:0%;left:30%;} </style> </head> <body> <!-- 控制页面滚动的时候,利用高度,自动高亮当前所在区块指示 --> <ul id="nav"> <li><a href="#intro" title="Next Section" data-edge-strategy="reset" data-0="@class:current" data-600="@class:"></a></li> <li><a href="#second" title="Next Section" data-edge-strategy="reset" data-600="@class:current" data-1900="@class: "></a></li> <li><a href="#third" title="Next Section" data-edge-strategy="reset" data-1900="@class:current" data-2500="@class: "></a></li> <li><a href="#content" title="Next Section" data-edge-strategy="reset" data-2500="@class:current" data-end="@class: "></a></li> </ul> <div id="skrollr-body"> <div id="intro" class="slide"> <div class="story"> <div class="float-left"> <h2 data-0="transform:scale(0) rotate(0deg);" data-300="transform:scale(1) rotate(1440deg);opacity:1;" data-400="opacity:0;">(Almost) Static Background</h2> <p>This section has a background that moves slightly slower than the user scrolls. This is achieved by changing the top position of the background for every pixel the page is scrolled.</p> </div> </div> <!--.story--> </div> <!--#intro--> <div id="second" class="slide"> <div class="story"><div class="bg"></div> <div class="float-right" style="position:relative;"> <h2 data-800="left:0%;opacity:0" data-1100="left:40%;opacity:1" data-1200="opacity:0">Multiple Backgrounds</h2> <div class="desc" data-600="right:0%;opacity:0" data-800="right:40%;opacity:1" data-1200="opacity:0"> <p>The multiple backgrounds applied to this section are moved in a similar way to the first section -- every time the user scrolls down the page by a pixel, the positions of the backgrounds are changed.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nibh erat, sagittis sit amet congue at, aliquam eu libero. Integer molestie, turpis vel ultrices facilisis, nisi mauris sollicitudin mauris, volutpat elementum enim urna eget odio. Donec egestas aliquet facilisis. Nunc eu nunc eget neque ornare fringilla. Nam vel sodales lectus. Nulla in pellentesque eros. Donec ultricies, enim vitae varius cursus, risus mauris iaculis neque, euismod sollicitudin metus erat vitae sapien. Sed pulvinar.</p> </div> </div> </div> <!--.story--> </div> <!--#second--> <div id="third" class="slide"> <div class="story"> <div class="float-left"> <h2 data-1800="transform:scale(0);opacity:1" data-2200="transform:scale(2);opacity:1" data-2300="opacity:0;">What Happens When JavaScript is Disabled?</h2> <p>The user gets a slap! Actually, all that jQuery does is moves the backgrounds relative to the position of the scrollbar. Without it, the backgrounds simply stay put and the user would never know they are missing out on the awesome! CSS2 does a good enough job to still make the effect look cool.</p> </div> </div> <!--.story--> </div> <!--#third--> <div id="content"> <div> <h1 data-bottom-top="display:none;transform:scale(1)" data-top-top="display:block;transform:scale(2)">Different anchor types</h1> <p> <strong>Scroll down to see different anchors in action.</strong> </p> <p>Biltong pastrami kielbasa short ribs, turducken shoulder pork chop boudin ground round speck cow. Fatback leberkas shank hamburger, tail pork belly tongue bresaola short ribs corned beef speck tri-tip ribeye. Filet mignon shoulder speck pastrami. Ham hock turducken corned beef shankle. Meatloaf shankle sausage boudin, shank flank turducken tenderloin pancetta ball tip. Biltong boudin jowl drumstick pig.</p> <p>Sirloin venison bresaola andouille pastrami short ribs. Short loin cow capicola tail ham hock leberkas. Frankfurter meatloaf capicola, swine ball tip jerky pork loin pork belly cow ribeye brisket strip steak jowl beef ribs ham hock. Pastrami ham hock rump turkey, pork belly capicola jerky. Turkey chuck beef, bresaola filet mignon jerky tri-tip pastrami. Bacon capicola jowl fatback short ribs. Speck shankle bacon chuck.</p> <p>Pork loin tail pork belly shank ham. Kielbasa venison ham, short loin ham hock beef ribs tri-tip ball tip pork belly. Ribeye sirloin sausage tenderloin hamburger. Strip steak tongue turkey, andouille bacon beef ribs venison. T-bone ball tip bresaola fatback, ground round meatball chicken sausage tongue pork chop leberkas sirloin jerky shank bacon. Turducken sirloin cow shankle pig, leberkas venison boudin pastrami.</p> <p>Cow fatback short loin, hamburger speck jowl turducken capicola ham hock. Hamburger corned beef strip steak shank filet mignon, jerky capicola chicken jowl ribeye pork ham hock ground round bresaola. Jowl ribeye kielbasa drumstick pork belly leberkas. Spare ribs fatback shankle, hamburger meatloaf sausage pork loin andouille pork kielbasa. Pancetta shank tongue, leberkas turducken shoulder rump meatball pork belly pig hamburger brisket biltong. Tenderloin short ribs pig, rump tail chuck turducken.</p> <p>Cow tri-tip pork loin salami corned beef. T-bone turkey ham frankfurter, brisket cow chicken bacon rump sirloin. Pancetta ribeye salami leberkas speck shank. Ribeye prosciutto swine venison speck beef.</p> <p>Biltong pastrami kielbasa short ribs, turducken shoulder pork chop boudin ground round speck cow. Fatback leberkas shank hamburger, tail pork belly tongue bresaola short ribs corned beef speck tri-tip ribeye. Filet mignon shoulder speck pastrami. Ham hock turducken corned beef shankle. Meatloaf shankle sausage boudin, shank flank turducken tenderloin pancetta ball tip. Biltong boudin jowl drumstick pig.</p> <p>Sirloin venison bresaola andouille pastrami short ribs. Short loin cow capicola tail ham hock leberkas. Frankfurter meatloaf capicola, swine ball tip jerky pork loin pork belly cow ribeye brisket strip steak jowl beef ribs ham hock. Pastrami ham hock rump turkey, pork belly capicola jerky. Turkey chuck beef, bresaola filet mignon jerky tri-tip pastrami. Bacon capicola jowl fatback short ribs. Speck shankle bacon chuck.</p> <p>Pork loin tail pork belly shank ham. Kielbasa venison ham, short loin ham hock beef ribs tri-tip ball tip pork belly. Ribeye sirloin sausage tenderloin hamburger. Strip steak tongue turkey, andouille bacon beef ribs venison. T-bone ball tip bresaola fatback, ground round meatball chicken sausage tongue pork chop leberkas sirloin jerky shank bacon. Turducken sirloin cow shankle pig, leberkas venison boudin pastrami.</p> <p>Cow fatback short loin, hamburger speck jowl turducken capicola ham hock. Hamburger corned beef strip steak shank filet mignon, jerky capicola chicken jowl ribeye pork ham hock ground round bresaola. Jowl ribeye kielbasa drumstick pork belly leberkas. Spare ribs fatback shankle, hamburger meatloaf sausage pork loin andouille pork kielbasa. Pancetta shank tongue, leberkas turducken shoulder rump meatball pork belly pig hamburger brisket biltong. Tenderloin short ribs pig, rump tail chuck turducken.</p> <p>Cow tri-tip pork loin salami corned beef. T-bone turkey ham frankfurter, brisket cow chicken bacon rump sirloin. Pancetta ribeye salami leberkas speck shank. Ribeye prosciutto swine venison speck beef.</p> <p>Biltong pastrami kielbasa short ribs, turducken shoulder pork chop boudin ground round speck cow. Fatback leberkas shank hamburger, tail pork belly tongue bresaola short ribs corned beef speck tri-tip ribeye. Filet mignon shoulder speck pastrami. Ham hock turducken corned beef shankle. Meatloaf shankle sausage boudin, shank flank turducken tenderloin pancetta ball tip. Biltong boudin jowl drumstick pig.</p> <p>Sirloin venison bresaola andouille pastrami short ribs. Short loin cow capicola tail ham hock leberkas. Frankfurter meatloaf capicola, swine ball tip jerky pork loin pork belly cow ribeye brisket strip steak jowl beef ribs ham hock. Pastrami ham hock rump turkey, pork belly capicola jerky. Turkey chuck beef, bresaola filet mignon jerky tri-tip pastrami. Bacon capicola jowl fatback short ribs. Speck shankle bacon chuck.</p> <p>Sirloin venison bresaola andouille pastrami short ribs. Short loin cow capicola tail ham hock leberkas. Frankfurter meatloaf capicola, swine ball tip jerky pork loin pork belly cow ribeye brisket strip steak jowl beef ribs ham hock. Pastrami ham hock rump turkey, pork belly capicola jerky. Turkey chuck beef, bresaola filet mignon jerky tri-tip pastrami. Bacon capicola jowl fatback short ribs. Speck shankle bacon chuck.</p> <p>Pork loin tail pork belly shank ham. Kielbasa venison ham, short loin ham hock beef ribs tri-tip ball tip pork belly. Ribeye sirloin sausage tenderloin hamburger. Strip steak tongue turkey, andouille bacon beef ribs venison. T-bone ball tip bresaola fatback, ground round meatball chicken sausage tongue pork chop leberkas sirloin jerky shank bacon. Turducken sirloin cow shankle pig, leberkas venison boudin pastrami.</p> <p>Cow fatback short loin, hamburger speck jowl turducken capicola ham hock. Hamburger corned beef strip steak shank filet mignon, jerky capicola chicken jowl ribeye pork ham hock ground round bresaola. Jowl ribeye kielbasa drumstick pork belly leberkas. Spare ribs fatback shankle, hamburger meatloaf sausage pork loin andouille pork kielbasa. Pancetta shank tongue, leberkas turducken shoulder rump meatball pork belly pig hamburger brisket biltong. Tenderloin short ribs pig, rump tail chuck turducken.</p> <p style="clear:both;">Cow tri-tip pork loin salami corned beef. T-bone turkey ham frankfurter, brisket cow chicken bacon rump sirloin. Pancetta ribeye salami leberkas speck shank. Ribeye prosciutto swine venison speck beef.</p> <p>Biltonri-tip pork loin salami corned beef. T-bone turkey ham frankfurter, brisket cow chicken bacon rump sirloin. Pancetta ribeye salami leberkas speck shank. Ribeye prosciutto swine venison speck beef.</p> </div> </div> </div> <script type="text/javascript" src="../dist/skrollr.min.js"></script> <!-- 引入menu插件,从而可以通过锚点,正确定位元素的位置 --> <script type="text/javascript" src="../dist/skrollr.menu.min.js"></script> <script type="text/javascript"> var s = skrollr.init({ //forceHeight: false }); skrollr.menu.init(s,{ }); </script> </body> </html>
发表评论
-
webpack简单打包PC网站前端资源
2016-02-23 14:30 1624:arrow: 1. 纯前端的打包输出,比较有局限 2 ... -
grunt构建基于seajs的网站实现
2015-06-16 16:49 1089Gruntfile.js module.exports ... -
js平滑滚动回到顶部
2015-06-10 11:42 3949优先使用 requestAnimationFrame实现。 实 ... -
fis-amd 的使用与修改
2015-05-26 16:14 3908https://github.com/fex-team/fis ... -
scrollMagic 视差与滚动动画GSAP
2015-05-19 18:14 4247scrollMagic(https://github.com/ ... -
stellar插件的使用
2015-05-18 17:30 1671<!DOCTYPE html> < ... -
icon font VS svg font
2015-05-14 15:21 1156关于字体图标和SVG图标,CSS TRICK网站有较好的说明。 ... -
gulp下静态资源的合并、压缩、MD5后缀
2015-05-05 15:48 22528var gulp = require('gulp'); ... -
DOMContentLoaded VS onload VS onreadystatechange
2015-04-30 14:50 69361. DOMContentLoaded 在页面html、scr ... -
简单的css3全屏滚动
2015-04-27 16:41 1399<!DOCTYPE html> <ht ... -
jquery插件treetable 的使用
2015-04-20 16:12 11836插件的文档写得不是很好,为了能弄出异步加载的功能,小折腾了一番 ... -
sublime 侧边栏字体大小修改
2015-04-16 10:46 3778【转载自:http://jekhy.com ... -
移动端的“点透”问题
2015-04-15 14:13 1604移动端的“点透”问题,这篇博文有较好的说明: http://w ... -
scheme缺少,ie的bug
2015-04-01 17:34 499在页面上定位一个资源(JS/CSS/image),通常的url ... -
大整数相加
2015-03-26 22:18 878function repeatStr(ch, n){ ... -
getBoundingClientRect 跨浏览器实现
2015-03-18 18:30 1058<head> <script ... -
window.name 跨域
2015-03-18 17:29 845window.name跨域的基础是:iframe页面在其url ... -
window.name 跨域
2015-03-18 17:27 1window.name跨域的基础是:iframe页面在其ur ... -
HTML History API
2015-03-13 18:05 1081// 替换当前浏览器history的最后一项记录。 hi ... -
Emberjs学习
2015-01-27 17:13 4048断断续续看了3周,还是一头雾水,文档不是很友好,这个框架,太多 ...
相关推荐
单独的视差滚动的JavaScript库,支持手机(Android,iOS,等)大小只有12K。 设计师友好。即使不懂JavaScript。只需要简单的CSS和HTML知识即可轻松上手。
滚动视差插件skrollr-master单独的视差滚动的JavaScript库,支持手机(Android,iOS,等)大小只有12K。演示地址:http://www.jq22.com/jquery-info418
Skrollr奇妙的视差滚动效果 Skrollr奇妙的视差滚动效果
NULL 博文链接:https://justcoding.iteye.com/blog/2102686
封装了一个UITableViewCell,可以将里面的图片或者其他控件进行视差滚动,即随着tableview的滚动而进行cell子视图位置更新,达到一个很奇妙的视差效果,详情可以到我的简书http://www.jianshu.com/p/d3d58903bdcc 看...
持背景层的移动速度小于内容层。或者可以加上一个贴图层,类比上面乘坐火车的例子,背景层相当于远处的山,贴图层相当于稍微近一些的树木,内容层则相当于乘客。二、通过b
插件描述:jQuery全屏视差滚动效果. 参考示例:http://www.jq22.com/jquery-info5465
是一个独立的移动和桌面视差滚动库。 skrollr-rails gem 将 skrollr 与 Rails 资产管道集成,以便于使用和版本控制。 安装 将此行添加到应用程序的 Gemfile 中: gem 'skrollr-rails' 然后执行: $ bundle ...
视差滚动parallax插件是一款类似海浪翻滚的视差滚动动画效果。
视差滚动 JS+css视察滚动 视差滚动 JS+css视察滚动 视差滚动 JS+css视察滚动
vue-parallax 快速60fps视差滚动效果组件
自己收集的几款视差滚动JS插件有DEMO,要做视差滚动的前端同学很有帮助
用于前端开发,视差滚动效果插件,background-attachment的一款好用插件
炫酷视差滚动欢迎引导动画界面.rar,太多无法一一验证是否可用,程序如果跑不起来需要自调,部分代码功能进行参考学习。
ParallaxPager视差动画效果的ViewPager.zip,太多无法一一验证是否可用,程序如果跑不起来需要自调,部分代码功能进行参考学习。
Flutter UI挑战-“城市规划师”视差滚动 关于项目 该应用程序是基于以下出色的UI概念编写的: : 非常感谢Stian ,他允许我根据他的UI概念编写应用程序。 非常感谢他对这个项目的大力投入。 查看他其余的出色设计:...
html5页面滚动图片视差滚动效果 html5页面滚动图片视差滚动效果 html5页面滚动图片视差滚动效果 html5页面滚动图片视差滚动效果
Parallax.js视差滚动插件
NULL 博文链接:https://justcoding.iteye.com/blog/2010030