• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com专业计算机教程网站
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • html/xhtml
  • html5
  • CSS
  • XML/XSLT
  • Dreamweaver教程
  • Frontpage教程
  • 心得技巧
  • bootstrap
  • vue
  • AngularJS
  • HBuilder教程
  • css3
  • 浏览器兼容
  • div/css
  • 网页编辑器
  • axure
您的位置:首页 > 网页设计 >html5 > 在线演示一个全屏切换效果实例

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

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2018-12-03

本文主要包含CSS3,样式表,css,制作,使用,全屏等相关知识,匿名希望在学习及工作中可以帮助到您

在线演示: DEMO

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

兼容代码前缀:

-webkit-

-moz-

-o-

-ms-

直接上代码:

<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>pagaToggle</title><style>/* 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; }</style></head><body><div class="box"><input type="radio" name="page_btn" checked><a href="javascript:;">Page1</a><input type="radio" name="page_btn"><a href="javascript:;">Page2</a><input type="radio" name="page_btn"><a href="javascript:;">Page3</a><input type="radio" name="page_btn"><a href="javascript:;">Page4</a><input type="radio" name="page_btn"><a href="javascript:;">Page5</a><div class="pages"><section><div></div><h2>g</h2><figure><img src="img/1.png" alt="pic"><figcaption><a href="http://www.cnblogs.com/glunefish" target="_blank"><span>THIS IS GLUNEFISH BLOG.</span></a> </figcaption></figure></section><section><div></div><h2>d</h2><figure><img src="img/1.png" alt="pic"><figcaption><a href="http://www.cnblogs.com/glunefish" target="_blank"><span>THIS IS GLUNEFISH BLOG.</span></a> </figcaption></figure></section><section><div></div><h2>e</h2><figure><img src="img/1.png" alt="pic"><figcaption><a href="http://www.cnblogs.com/glunefish" target="_blank"><span>THIS IS GLUNEFISH BLOG.</span></a> </figcaption></figure></section><section><div></div><h2>f</h2><figure><img src="img/1.png" alt="pic">

您可能想查找下面的文章:

  • 纯HTML5+CSS3制作生日蛋糕(代码易懂)
  • 浅谈html5标签css3的常用样式
  • HTML5+CSS3实现机器猫
  • CSS3 画基本图形,圆形、椭圆形、三角形等
  • 浅谈HTML5 & CSS3的新交互特性
  • HTML5和CSS3实例教程总结(推荐)
  • 关于老式浏览器兼容HTML5和CSS3的问题
  • html5+css3进度条倒计时动画特效代码【推荐】
  • HTML5+CSS3绘制锯齿状的矩形
  • 推荐WEB开发者最佳HTML5和CSS3代码生成器

相关文章

  • 2018-12-03提高HTML5 Canvas性能的技巧
  • 2018-12-03HTML 5 标签、属性、事件及浏览器兼容性速查表 附打包下载_html5教程技巧
  • 2018-12-03H5怎样用绘制五角星
  • 2017-08-06html5指南-2.如何操作document metadata
  • 2017-08-06HTML5 b和i标记将被赋予真正的语义
  • 2018-12-03HTML5 Input 类型的详细介绍以及实例代码
  • 2018-12-03html5 border属性怎么设置?html5 table中的border属性介绍
  • 2018-12-03HTML5的学习之路
  • 2018-12-03HTML5游戏开发 之 循环的控制(3)
  • 2017-08-06HTML5之SVG 2D入门10—滤镜的定义及使用

文章分类

  • html/xhtml
  • html5
  • CSS
  • XML/XSLT
  • Dreamweaver教程
  • Frontpage教程
  • 心得技巧
  • bootstrap
  • vue
  • AngularJS
  • HBuilder教程
  • css3
  • 浏览器兼容
  • div/css
  • 网页编辑器
  • axure

最近更新的内容

    • 详解H5的自定义属性data-*
    • 深入研究HTML5实现图片压缩上传功能_html5教程技巧
    • html5 canvas绘制矩形和圆形的实例代码
    • 如何通过html5实现摇一摇的功能
    • HTML5 CSS3新的WEB标准和浏览器支持
    • [HTML5代码艺术]17行代码的贪吃蛇小游戏
    • 检测浏览器是否支持html5视频的代码_html5教程技巧
    • HTML5-XMLHttpRequest Level 2概述详解
    • 使用canvas实现视频里的弹幕效果
    • html5 Web SQL Database 之事务处理函数transaction与executeSQL解析_html5教程技巧

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有