在线演示一个全屏切换效果实例

 

在线演示一个全屏切换效果实例

 

在线演示: DEMO

DEMO中及以下代码并没有写兼容代码,请使用高级浏览器打开,IE版本对CSS3支持并不太友好,IE11打开没有滚屏效果。

兼容代码前缀:

-webkit-

-moz-

-o-

-ms-

 

直接上代码:

pagaToggle/* Pre Style */* { padding: 0; margin: 0; border: none; outline: none; text-decoration: none; }body { overflow: hidden; }/* fontface */@font-face {font-family: "raphaelicons";src: url('fonts/raphaelicons-webfont.eot') ,                 url('fonts/raphaelicons-webfont.svg') ,                 url('fonts/raphaelicons-webfont.ttf') ,                 url('fonts/raphaelicons-webfont.woff') ;font-weight: normal;font-style: normal;}/* media */        @media screen and ( max-width: 500px ) {.box .pages > section > div { width: 40vw; height: 40vw; }.box .pages > section > h2 { font-size: 15vw; top: 5vw; }}        @media screen and ( max-width: 1100px ) {.box .pages > section > figure > figcaption > a > span { font-size: 5vw; line-height: 200px; }}/* Nav Style */        .box { width: 100%; height: 100%; }.box > input, .box > a, .box > a:after { position:  fixed; }.box > input { width: 20%; height: 60px; opacity: 0; z-index: 2; cursor: pointer; bottom: 0; }.box > a { width: 20%; height: 60px; display: inline-block; text-align: center; color: white; font: 2vw/60px arial; text-shadow: 1px 1px 1px black; background-color: #f14d6f; z-index: 1; bottom: 0; }.box > a:after { content: ""; width: 0; height: 0; display: block; border: 40px solid rgba(0,0,0,0); border-bottom-color: #f14d6f; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); }.box > input:nth-of-type(1),a:nth-of-type(1){ left: 0%; }.box > input:nth-of-type(2),a:nth-of-type(2){ left: 20%; }.box > input:nth-of-type(3),a:nth-of-type(3){ left: 40%; }.box > input:nth-of-type(4),a:nth-of-type(4){ left: 60%; }.box > input:nth-of-type(5),a:nth-of-type(5){ left: 80%; }.box > input:checked + a { background-color: #8c1e34; }.box > input:checked + a:after { border-bottom-color: #8c1e34; }.box > input:hover + a { background-color: #c13955; }.box > input:hover + a:after { border-bottom-color: #c13955; }.box > input:checked:hover + a { background-color: #8c1e34; }.box > input:checked:hover + a:after { border-bottom-color: #8c1e34; }/* Toggle Style */.box > input:nth-of-type(1):checked ~ .pages { transform: translateY(0vh); }.box > input:nth-of-type(2):checked ~ .pages { transform: translateY(-100vh); }.box > input:nth-of-type(3):checked ~ .pages { transform: translateY(-200vh); }.box > input:nth-of-type(4):checked ~ .pages { transform: translateY(-300vh); }.box > input:nth-of-type(5):checked ~ .pages { transform: translateY(-400vh); }.box > input:nth-of-type(1):checked ~ .pages > section:nth-of-type(1) > figure > img { animation: imgfloat .6s ease-in backwards .4s; }.box > input:nth-of-type(2):checked ~ .pages > section:nth-of-type(2) > figure > img { animation: imgfloat .6s ease-in backwards .4s; }.box > input:nth-of-type(3):checked ~ .pages > section:nth-of-type(3) > figure > img { animation: imgfloat .6s ease-in backwards .4s; }.box > input:nth-of-type(4):checked ~ .pages > section:nth-of-type(4) > figure > img { animation: imgfloat .6s ease-in backwards .4s; }.box > input:nth-of-type(5):checked ~ .pages > section:nth-of-type(5) > figure > img { animation: imgfloat .6s ease-in backwards .4s; }.box > input:nth-of-type(1):checked ~ .pages > section:nth-of-type(1) > figure > figcaption > a > span { animation: textfloat .6s ease-in backwards .4s; }.box > input:nth-of-type(2):checked ~ .pages > section:nth-of-type(2) > figure > figcaption > a > span { animation: textfloat .6s ease-in backwards .4s; }.box > input:nth-of-type(3):checked ~ .pages > section:nth-of-type(3) > figure > figcaption > a > span { animation: textfloat .6s ease-in backwards .4s; }.box > input:nth-of-type(4):checked ~ .pages > section:nth-of-type(4) > figure > figcaption > a > span { animation: textfloat .6s ease-in backwards .4s; }.box > input:nth-of-type(5):checked ~ .pages > section:nth-of-type(5) > figure > figcaption > a > span { animation: textfloat .6s ease-in backwards .4s; }@keyframes imgfloat {from { opacity: 0; transform: translateY(-40px); }to { opacity: 1; }}                @keyframes textfloat {from { opacity: 0; transform: translateY(40px); }to { opacity: 1; }}/* Pages Style    */.pages { transition: all .6s linear; }.pages > section { width: 100vw; height: 100vh; background-color: white; text-align: center; color: #ffa2b5; overflow: hidden; position: relative; }.pages > section:nth-of-type(odd) { background-color: #ffa2b5; color: white; }.pages > section > div { width: 300px; height: 300px; background: #ffa2b5; margin: 0 auto; text-align: center; transform: translateY(-50%) rotate(45deg); }.pages > section:nth-of-type(odd) div { background: white; }.pages > section > h2 { font-family: "raphaelicons"; font-size: 120px; color: white; display: inline-block; position: absolute; top: 4vh; left: 50%; transform: translateX(-50%); }.pages > section:nth-of-type(odd) > h2 { color: #ffa2b5;  }.pages > section > figure > img { box-shadow: 0 0 3px black; opacity: 1; }.pages > section > figure > figcaption > a > span { font: 80px/270px arial; text-shadow: 1px 1px 1px black; color: #ffa2b5; }.pages > section:nth-of-type(odd) > figure > figcaption > a > span { color: white; }

登录后复制

 

在线演示一个全屏切换效果实例在线演示一个全屏切换效果实例在线演示一个全屏切换效果实例在线演示一个全屏切换效果实例在线演示一个全屏切换效果实例

以上就是在线演示一个全屏切换效果实例的详细内容,更多请关注【创想鸟】其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。

发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/2910913.html

(0)
上一篇 2025年3月11日 04:37:24
下一篇 2025年2月18日 10:55:38

AD推荐 黄金广告位招租... 更多推荐

相关推荐

  • Less与Sass框架如何使用?

    一、less语法   1.变量声明:     @变量名:变量值;  1 @newHeight:20px; 登录后复制   2.调用变量: 1 .box {2 width: @newHeight;3 height: @newHeight; 4…

    编程技术 2025年3月11日
    200
  • CSS3 Flexbox该怎么使用?

    文章来源: 一、前言 Flexbox 是一个 CSS3 的盒子模型 ( box model ),顾名思义它就是一个灵活的盒子 ( Flexible Box ),为什麽最近这个属性才红起来呢?最主要也是因为 CSS3 的规范终于普及 ( 或 …

    2025年3月11日 编程技术
    200
  • 带你了解css中的3D效果

    —恢复内容开始— 今天咱们来说一下,CSS中的3D效果 .如果你把transform真的掌握的和纯熟的话,就可以直接通过CSS做出很多很炫酷的效果,甚至.轮播图和选项卡都可以通过CSS来做,咱们明天就说如何运用CSS…

    编程技术 2025年3月11日
    200
  • SVG制作简单图形的实例介绍

    圆形 circle 登录后复制 矩形 rect 登录后复制 椭圆 ellipse 登录后复制 线 line 登录后复制登录后复制 折线 polyline 登录后复制登录后复制 多边形 polygon 登录后复制 路径 path 可用于路径数…

    编程技术 2025年3月11日
    200
  • css书写顺序需要注意哪些?

    一、css顺序   首先声明,浏览器读取css的方式是从上到下的。我们一般书写css只要元素具备这些属性就会达到我们预期的效果,但是这会给以后的维护和浏览器的渲染效率带来一定的影响,那么该怎么书写css的顺序呢?有没有一定的规范呢?   首…

    编程技术 2025年3月11日
    200
  • 移动端全景装修图的实现实例分享

    移动端全景装修图的实现实例分享 nbsp;html>Documentbody,html {margin: 0;height: 100%;overflow: hidden;position: relative;}.wrap {posit…

    编程技术 2025年3月11日
    200
  • css动画制作——CSS animate

    熟悉css的人都知道,css可以实现很多漂亮的动画,特别是它的在线功能,能够帮助人们解决很多制作动画的效果。今天特别推荐一个在线css插件功能——cssanimate,这个最大的特色就是以图形界面方式让你轻易实现漂亮的css3动画效果,下面…

    2025年3月11日 编程技术
    200
  • AngularJS“路由”的简介及用法介绍

    这是小编的一些学习资料,理论上只是为了自己以后学习需要的,但是还是需要认真对待的以下内容仅供参考,请慎重使用学习 angularjs“路由”的定义概念 AngularJS最近真的很火,很多同事啊同学啊朋友都在用,这不推荐我学习,听到这个名字…

    2025年3月11日
    200
  • 用css3实现打点效果实例讲解

    基于box-shadow实现的打点效果 理论上,box-shadow可以实现任意的图形效果,自然我们可以利用box-shadow生成我们的点效果,然后通过animation控制不同时间点点的数目就可以实现点点点… loading…

    编程技术 2025年3月11日
    200
  • html5+CSS如何控制Table内外边框和颜色以及大小的图文教程

    在默认的情况下,我们的css将table的边框清除掉了,下面与大家分享下css控制table内外边框、颜色、大小的样式,想学习的朋友可以参考下 其实按照常理来说,现在的网站应该早已经抛弃什么表格了,现在肯定是p+CSS当道嘛!不过客户的网站…

    2025年3月11日 编程技术
    200

发表回复

登录后才能评论