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

仿网易nec首页动画效果(实现原理+代码)

作者:佚名 字体:[增加 减小] 来源:互联网 时间:2017-06-02

本文主要包含网易nec,网易nec框架,网易css框架 nec,网易周边商城首页,网易财经网首页股吧等相关知识,佚名 希望在学习及工作中可以帮助到您
仿网页nec首页动画效果
nec链接:http://nec.netease.com/
首先,介绍animation
animation检索或设置对象所应用的动画特效。
animation由“keyframes”这个属性来实现这样的效果。
keyframes具有其自己的语法规则,他的命名是由"@keyframes"开头,后面紧接着是这个“动画的名称”加上一对花括号“{}”,括号中就是一些不同时间段样式规则,有点像我们css的样式写法一样。

关于animation属性介绍:
animation-name:检索或设置对象所应用的动画名称
animation-duration:检索或设置对象动画的持续时间
animation-timing-function:检索或设置对象动画的过渡类型
animation-delay:检索或设置对象动画延迟的时间
animation-iteration-count:检索或设置对象动画的循环次数
animation-direction:检索或设置对象动画在循环中是否反向运动
animation-play-state:检索或设置对象动画的状态。w3c正考虑是否将该属性移除,因为动画的状态可以通过其它的方式实现,比如重设样式

nec动画实现原理:
采用三层背景层、气泡层、文字镂空层。气泡层通过animation属性实现了运动效果。

html结构:

<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>仿网易nec首页动画效果</title> <style> *{padding: 0px; margin: 0px;} .kbanner{ position: relative; width: 856px; height: 366px; background: url(http://files.weikejianghu.com/file_images/article/201306/o_banner1.jpg) center top no-repeat; } .knecbg{ position: absolute; left: 150px; top: 77px; width: 487px; height: 186px; overflow: hidden; } .knecone{ background: url(http://files.weikejianghu.com/file_images/article/201306/o_pao.png) left top no-repeat; z-index: 1; } .knectwo{ z-index: 2; } .knecthree{ background: url(http://files.weikejianghu.com/file_images/article/201306/o_pao.png) left bottom no-repeat; z-index: 3; } .knectwo i{ position: absolute; display: block; top: -50px; width: 53px; height: 56px; overflow: hidden; background: url(http://files.weikejianghu.com/file_images/article/201306/o_pao.png) no-repeat -9999px -9999px; -webkit-animation: paoi 7s 2s infinite; -moz-animation: paoi 7s 2s infinite; -ms-animation: paoi 7s 2s infinite; animation: paoi 7s 2s infinite; } .knectwo i:nth-child(1){ left: 25px; -webkit-animation-delay: 3s; -moz-animation-delay: 3s; -ms-animation-delay: 3s; animation-delay: 3s; background-position: -507px 0; } .knectwo i:nth-child(2){ left: 85px; -webkit-animation-delay: 6s; -moz-animation-delay: 6s; -ms-animation-delay: 6s; animation-delay: 6s; background-position: -507px -64px; } .knectwo i:nth-child(3){ left: 190px; -webkit-animation-delay: 4s; -moz-animation-delay: 4s; -ms-animation-delay: 4s; animation-delay: 4s; background-position: -507px -140px; } .knectwo i:nth-child(4){ left: 285px; -webkit-animation-delay: 8s; -moz-animation-delay: 8s; -ms-animation-delay: 8s; animation-delay: 8s; background-position: -507px 0; } .knectwo i:nth-child(5){ left: 400px; -webkit-animation-delay: 5s; -moz-animation-delay: 5s; -ms-animation-delay: 5s; animation-delay: 5s; background-position: -507px 0; } @-webkit-keyframes paoi { 0% { top:186px; } 100% { top:-56px; } }@-moz-keyframes paoi { 0% { top:186px; } 100% { top:-56px; } }@-ms-keyframes paoi { 0% { top:186px; } 100% { top:-56px; } }@keyframes paoi { 0% { top:186px; } 100% { top:-56px; } </style> </head> <body> <div class="kbanner"> <div class="knecbg knecone"></div> <div class="knecbg knectwo"> <i></i> <i></i> <i></i> <i></i> <i></i> </div> <div class="knecbg knecthree"></div> </div> </body> </html>
提示:您可以先修改部分代码再运行</div> </div>

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

  • 仿网易nec首页动画效果(实现原理+代码)

相关文章

  • 2017-06-02IE6 两个div有间隙的问题(IE 3px bug)
  • 2017-06-02DIV多层嵌套margin-top的BUG问题
  • 2017-06-02css固定宽度并且让最后一行文字换行
  • 2017-06-02将一个绝对定位的div水平垂直居中对齐
  • 2017-06-02div+css实现鼠标经过背景高亮的导航菜单代码
  • 2017-06-02CSS在固定宽高的div内实现垂直居中的实例详解
  • 2017-06-02css实现随鼠标移动div渐变色效果
  • 2017-06-02强制显示、隐藏(IE\Mozilla)浏览器的滚动条实现代码
  • 2017-06-02div 溢出隐藏 div文字溢出用点(省略号)代替
  • 2017-06-02DIV+CSS中让布局、背景图片、文字内容居中的方法

文章分类

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

最近更新的内容

    • 利用HTML、CSS实现的图片预览弹出层的教程
    • 关于学习DIV CSS的一些精妙问答
    • css动画+照片清晰度动画的实现方法
    • css float浮动属性的深入研究及详解拓展(一)
    • div css网页适应不同分辨率技巧
    • CSS position属性的正确解释和实例应用
    • 经验之谈 CSS网页布局避免滥用DIV元素
    • 窗口居中,自适应高度
    • 常用的新闻列表代码(ul/li布局方式)
    • div+css实现圆角即网页上常用的圆角效果

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

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