纯css3制作的火影忍者写轮眼开眼至轮回眼及进化过程实例


Posted in HTML / CSS onNovember 11, 2014

本文实例讲述了纯css3制作的火影忍者中写轮眼开眼至轮回眼及进化过程实现方法。分享给大家供大家参考。具体分析如下:

今天是火影忍者(漫画)宣告完结的日子。看过火影的朋友都知道,写轮眼是什么,这里就不多说了。下面就直接展示整个效果,上张图,先睹为快:

纯css3制作的火影忍者写轮眼开眼至轮回眼及进化过程实例

目前已经测试 IE10、Firefox浏览器、Chrome浏览器、Opera浏览器、360浏览器(两种模式)兼容已通过。

温馨提示:以上浏览器版本号均最新的;动画过程中每个阶段大约会停留5秒钟,希望你不会中幻术^_^。

点击此处在线演示。(由于是基于css3实现的特效,建议使用支持css3的火狐或谷歌等浏览器在线浏览)

点击此处本站下载。

HTML代码如下:

复制代码
代码如下:

<div class="container">
<!--左眼开始-->
<div class="eyesBoxs pullLeft">
<div class="profile skewLeft"></div>
<div class="shadow skewLeft"></div>
<div class="basic ani-narrow"></div>
<div class="eyes ani-zoom">
<div class="line">
<div class="hook ani-rotateHook">
<span class="bar"><b></b></span>
<span class="bar"><b></b></span>
<span class="bar"><b></b></span>
</div>
<div class="tube ani-rotateTube">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</div>
</div>
</div>
<div class="trans skewLeft">
<span class="bar ani-shadow"></span>
</div>
</div>
<!--左眼结束-->
<!--右眼开始-->
<div class="eyesBoxs pullRight">
<div class="profile skewRight"></div>
<div class="shadow skewRight"></div>
<div class="basic ani-narrow"></div>
<div class="eyes ani-zoom">
<div class="line">
<div class="hook ani-rotateHook">
<span class="bar"><b></b></span>
<span class="bar"><b></b></span>
<span class="bar"><b></b></span>
</div>
<div class="tube ani-rotateTube">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</div>
</div>
</div>
<div class="trans skewRight">
<span class="bar ani-shadow"></span>
</div>
</div>
<!--右眼结束-->
</div>

CSS代码如下:

复制代码
代码如下:

*{margin:0;padding:0;}
.container{ width:800px; height:200px; margin:30px auto;overflow:hidden; background:#000; position:relative;}
.eyesBoxs{width:130px;height:70px;position:absolute;top:50px;}
.pullLeft{left:100px;}
.pullRight{right:100px;}
.profile{
width:130px;
height:70px;
background:#fff;
position:absolute;
top:0;
left:0;
overflow:hidden;
border-radius:0 70px 0 50px;
}
.shadow{
display:block;
width:130px;
height:70px;
position:absolute;
top:0;
z-index:5;
border-radius:0 90px 0 60px;
box-shadow:5px 12px 2px 5px rgba(0,0,0,.25) inset;
}
.skewLeft{
transform:skewX(15deg);
-webkit-transform:skewX(15deg);
-o-transform:skewX(15deg);
}
.skewRight{
transform:skewX(-15deg) scale(-1,1);
-webkit-transform:skewX(-15deg) scale(-1,1);
-o-transform:skewX(-15deg) scale(-1,1);
}
.basic{
width:60px;
height:60px;
background:#000;
position:absolute;
top:50%;
left:50%;
z-index:10;
margin-top:-30px;
border-radius:60%;
}
.basic:before{
content:"";
display:block;
width:10px;
height:11px;
position:absolute;
left:15px;
top:15px;
z-index:100;
border-radius:60%;
background-image:radial-gradient(circle,rgb(225,225,225),rgb(225,225,225),rgba(225,225,225,0.9),rgba(225,225,225,0.3));
-webkit-background-image:radial-gradient(circle,rgb(225,225,225),rgb(225,225,225),rgba(225,225,225,0.9),rgba(225,225,225,0.3));
-o-background-image:radial-gradient(circle,rgb(225,225,225),rgb(225,225,225),rgba(225,225,225,0.9),rgba(225,225,225,0.3));
}
.pullLeft .basic{
margin-left:-33px;
}
.pullRight .basic{
margin-left:-27px;
}
.eyes{
width:55px;
height:55px;
background:#ff0000;
position:absolute;
top:8px;
border-radius:60%;
box-shadow:0 0 2px 4px #bd0000 inset,0 0 0 2px #000;
}
.pullLeft .eyes{left:35px;}
.pullRight .eyes{right:35px;}
.eyes .line{
width:64%;
height:64%;
background:#ff0000;
position:absolute;
right:0;
left:0;
top:10px;
margin:0 auto;
border-radius:60%;
box-shadow:0 0 2px 0 #b20000 inset;
}
.eyes .line:before{
content:"";
display:block;
width:10px;
height:11px;
position:absolute;
left:3px;
top:4px;
z-index:100;
border-radius:60%;
background-image:radial-gradient(circle,rgb(225,225,225),rgb(225,225,225),rgba(225,225,225,0.7),rgba(225,225,225,0.3));
-webkit-background-image:radial-gradient(circle,rgb(225,225,225),rgb(225,225,225),rgba(225,225,225,0.7),rgba(225,225,225,0.3));
-o-background-image:radial-gradient(circle,rgb(225,225,225),rgb(225,225,225),rgba(225,225,225,0.7),rgba(225,225,225,0.3));
}
.eyes .line:after{
content:"";
display:block;
width:10px;
height:10px;
position:absolute;
background:#000;
right:0;
left:-1px;
top:13px;
z-index:100;
margin:0 auto;
border-radius:60%;
transform:rotate(150deg);
-webkit-transform:rotate(150deg);
-o-transform:rotate(150deg);
animation:colour 0.5s ease-in 7s;
-webkit-animation:colour 0.5s ease-in 7s;
-o-animation:colour 0.5s ease-in 7s;
}
@keyframes colour{
0%{
background:#000;
}
100%{
background:#f00;
}
}
@-webkit-keyframes colour{
0%{
background:#000;
}
100%{
background:#f00;
}
}
@-o-keyframes colour{
0%{
background:#000;
}
100%{
background:#f00;
}
}
.hook{
width:92%;
height:92%;
position:absolute;
right:0;
left:0;
top:5%;
margin:0 auto;
border-radius:60%;
}
.hook .bar{
display:block;
width:100%;
height:100%;
position:absolute;
left:0;
top:0;
border-radius:60%;
}
.hook .bar b{
display:block;
width:8px;
height:8px;
background:#000;
position:absolute;
left:0;
bottom:0;
border-radius:60%;
}
.hook .bar b:after{
content:"";
width:8px;
height:8px;
border-color:transparent transparent #000 transparent;
border-style:solid;
border-width:0 0 5px 0;
position:absolute;
top:-1px;
left:-3px;
z-index:100;
border-radius:0 0 0 70%;
transform:rotate(-75deg);
-webkit-transform:rotate(-75deg);
-o-transform:rotate(-75deg);
}
.hook .bar:nth-child(1){
transform:rotate(10deg);
-webkit-transform:rotate(10deg);
-o-transform:rotate(10deg);
}
.hook .bar:nth-child(2){
transform:rotate(130deg);
-webkit-transform:rotate(130deg);
-o-transform:rotate(130deg);
}
.hook .bar:nth-child(3){
transform:rotate(250deg);
-webkit-transform:rotate(250deg);
-o-transform:rotate(250deg);
}
.tube{
width:93%;
height:93%;
position:absolute;
right:0;
left:0px;
top:2px;
margin:0 auto;
background:#000;
border-radius:60%;
}
.tube .bar{
display:block;
width:10px;
height:20px;
border-style:solid;
border-width:0 0 0 10px;
border-color:transparent transparent transparent black;
position:absolute;
border-radius:100% 0 0 0;
}
.tube .bar:nth-child(1){
top:-10px;
left:2px;
transform:rotate(-10deg);
}
.tube .bar:nth-child(2){
bottom:0px;
right:-10px;
transform:rotate(105deg);
-webkit-transform:rotate(105deg);
-o-transform:rotate(105deg);
}
.tube .bar:nth-child(3){
bottom:-3px;
left:-10px;
transform:rotate(235deg);
-webkit-transform:rotate(235deg);
-o-transform:rotate(235deg);
}
.trans{
width:130px;
height:70px;
position:absolute;
overflow:hidden;
top:0;
left:0;
border-radius:0 70px 0 50px;
}
.trans .bar{
display:block;
width:9px;
height:9px;
background:#000;
position:absolute;
top:50%;
z-index:2;
margin:-4px 0 0 -4px;
border-radius:60%;
}
.trans .bar:after{
content:"";
display:block;
width:11px;
height:12px;
position:absolute;
top:-13px;
left:-13px;
z-index:100;
border-radius:60%;
background:rgba(250,250,250,.85);
}
.pullLeft .trans .bar{
transform:skewX(-15deg);
-webkit-transform:skewX(-15deg);
-o-transform:skewX(-15deg);
}
.pullLeft .trans .bar{left:48%;}
.pullRight .trans .bar{
transform:skewX(-15deg) scale(-1,1);
-webkit-transform:skewX(-15deg) scale(-1,1);
-o-transform:skewX(-15deg) scale(-1,1);
}
.pullRight .trans .bar{right:48%;}
.ani-narrow{
animation:ani-narrow 0.5s linear 1s;
-webkit-animation:ani-narrow 0.5s linear 1s;
-o-animation:ani-narrow 0.5s linear 1s;
}
@keyframes ani-narrow{
from{
transform:scale(1);
}
to{
opacity:0;
transform:scale(0);
}
}
@-webkit-keyframes ani-narrow{
from{
-webkit-transform:scale(1);
}
to{
opacity:0;
-webkit-transform:scale(0);
}
}
@-o-keyframes ani-narrow{
from{
-o-transform:scale(1);
}
to{
opacity:0;
-o-transform:scale(0);
}
}
.ani-zoom{
animation:ani-zoom 11s linear 0.8s;
-webkit-animation:ani-zoom 11s linear 0.8s;
-o-animation:ani-zoom 11s linear 0.8s;
}
@keyframes ani-zoom{
0%{
opacity:0;
transform:scale(0);
}
6%{
opacity:1;
transform:scale(1);
}
95%{
opacity:1;
transform:scale(1);
}
100%{
opacity:0;
transform:scale(1.5);
}
}
@-webkit-keyframes ani-zoom{
0%{
opacity:0;
-webkit-transform:scale(0);
}
6%{
opacity:1;
-webkit-transform:scale(1);
}
95%{
opacity:1;
-webkit-transform:scale(1);
}
100%{
opacity:0;
-webkit-transform:scale(1.5);
}
}
@-o-keyframes ani-zoom{
0%{
opacity:0;
-o-transform:scale(0);
}
6%{
opacity:1;
-o-transform:scale(1);
}
95%{
opacity:1;
-o-transform:scale(1);
}
100%{
opacity:0;
-o-transform:scale(1.5);
}
}
.ani-rotateHook{
animation:ani-rotateHook 5s ease-in 2.5s;
-webkit-animation:ani-rotateHook 5s ease-in 2.5s;
-o-animation:ani-rotateHook 5s ease-in 2.5s;
}
@keyframes ani-rotateHook{
0%{
opacity:0;
transform:scale(0) rotate(0);
}
15%{
opacity:1;
transform:scale(1) rotate(-360deg);
}
90%{
opacity:1;
transform:scale(1) rotate(-360deg);
}
100%{
opacity:0;
transform:scale(1.8) rotate(-540deg);
}
}
@-webkit-keyframes ani-rotateHook{
0%{
opacity:0;
-webkit-transform:scale(0) rotate(0);
}
15%{
opacity:1;
-webkit-transform:scale(1) rotate(-360deg);
}
90%{
opacity:1;
-webkit-transform:scale(1) rotate(-360deg);
}
100%{
opacity:0;
-webkit-transform:scale(1.8) rotate(-540deg);
}
}
@-o-keyframes ani-rotateHook{
0%{
opacity:0;
-o-transform:scale(0) rotate(0);
}
15%{
opacity:1;
-o-transform:scale(1) rotate(-360deg);
}
90%{
opacity:1;
-o-transform:scale(1) rotate(-360deg);
}
100%{
opacity:0;
-o-transform:scale(1.8) rotate(-540deg);
}
}
.ani-rotateTube{
animation:ani-rotateTube 5s ease-in-out 6.5s;
-webkit-animation:ani-rotateTube 5s ease-in-out 6.5s;
-o-animation:ani-rotateTube 5s ease-in-out 6.5s;
}
@keyframes ani-rotateTube{
0%{
opacity:0;
transform:scale(0) rotate(0);
}
30%{
opacity:1;
transform:scale(1) rotate(-360deg);
}
100%{
opacity:1;
transform:scale(1) rotate(-360deg);
}
}
@-webkit-keyframes ani-rotateTube{
0%{
opacity:0;
-webkit-transform:scale(0) rotate(0);
}
30%{
opacity:1;
-webkit-transform:scale(1) rotate(-360deg);
}
100%{
opacity:1;
-webkit-transform:scale(1) rotate(-360deg);
}
}
@-o-keyframes ani-rotateTube{
0%{
opacity:0;
-o-transform:scale(0) rotate(0);
}
30%{
opacity:1;
-o-transform:scale(1) rotate(-360deg);
}
100%{
opacity:1;
-o-transform:scale(1) rotate(-360deg);
}
}
.ani-shadow{
animation:ani-shadow 1s linear 11s;
-webkit-animation:ani-shadow 1s linear 11s;
-o-animation:ani-shadow 1s linear 11s;
}
@keyframes ani-shadow{
0%{
opacity:0;
box-shadow:none;
}
100%{
opacity:1;
box-shadow:0 0 0 14px #464646,0 0 0 16px #000,0 0 0 30px #6c6c6c,0 0 0 32px #000,0 0 0 44px #a6a6a6,0 0 0 46px #000;
}
}
@-webkit-keyframes ani-shadow{
0%{
opacity:0;
box-shadow:none;
}
100%{
opacity:1;
box-shadow:0 0 0 14px #464646,0 0 0 16px #000,0 0 0 30px #6c6c6c,0 0 0 32px #000,0 0 0 44px #a6a6a6,0 0 0 46px #000;
}
}
@-o-keyframes ani-shadow{
0%{
opacity:0;
box-shadow:none;
}
100%{
opacity:1;
box-shadow:0 0 0 14px #464646,0 0 0 16px #000,0 0 0 30px #6c6c6c,0 0 0 32px #000,0 0 0 44px #a6a6a6,0 0 0 46px #000;
}
}
.ani-narrow,
.ani-zoom,
.ani-rotateHook,
.ani-rotateTube,
.ani-shadow,
.eyes .line:after{
animation-fill-mode:both;
-webkit-animation-fill-mode:both;
-o-animation-fill-mode:both;
}

感兴趣的朋友可以测试运行一下本文实例~O(∩_∩)O~

HTML / CSS 相关文章推荐
CSS3 创建网页动画实现弹跳球动效果
Oct 30 HTML / CSS
css3中flex布局宽度不生效的解决
Dec 09 HTML / CSS
html5+CSS3+JS实现七夕言情功能代码
Aug 28 HTML / CSS
html5 分层屏幕适配的方法
Mar 16 HTML / CSS
input file上传文件样式支持html5的浏览器解决方案
Nov 14 HTML / CSS
HTML5组件Canvas实现图像灰度化(步骤+实例效果)
Apr 22 HTML / CSS
解析HTML5中的新功能本地存储localStorage
Mar 01 HTML / CSS
整理HTML5移动端开发的常用触摸事件
Apr 15 HTML / CSS
HTML5 weui使用笔记
Nov 21 HTML / CSS
HTML+CSS+JavaScript实现图片3D展览的示例代码
Oct 12 HTML / CSS
CSS 新特性 contain控制页面的重绘与重排问题
Apr 30 HTML / CSS
css3新特性的应用示例分析
Mar 16 HTML / CSS
实例教程 一款纯css3实现的数字统计游戏
Nov 10 #HTML / CSS
一款纯css3实现的鼠标经过按钮特效教程
Nov 09 #HTML / CSS
一款纯css3实现简单的checkbox复选框和radio单选框
Nov 05 #HTML / CSS
一款CSS3实现多功能下拉菜单(带分享按)的教程
Nov 05 #HTML / CSS
实例教程 纯CSS3打造非常炫的加载动画效果
Nov 05 #HTML / CSS
纯CSS3实现自定义Tooltip边框涂鸦风格的教程
Nov 05 #HTML / CSS
支持IE8的纯css3开发的响应式设计动画菜单教程
Nov 05 #HTML / CSS
You might like
桌面中心(一)创建数据库
2006/10/09 PHP
用PHP实现多服务器共享SESSION数据的方法
2007/03/16 PHP
在Laravel 的 Blade 模版中实现定义变量
2019/10/14 PHP
dreamweaver 安装Jquery智能提示
2011/04/02 Javascript
JQuery事件e参数的方法preventDefault()取消默认行为
2013/09/26 Javascript
jquery实现类似淘宝星星评分功能有截图
2014/09/15 Javascript
SWFObject基本用法实例分析
2015/07/20 Javascript
jquery彩色投票进度条简单实例演示
2020/07/23 Javascript
jQuery UI库中dialog对话框功能使用全解析
2016/04/23 Javascript
JavaScript实现使用Canvas绘制图形的基本教程
2016/10/27 Javascript
Javascript中return的使用与闭包详解
2017/01/11 Javascript
B/S(Web)实时通讯解决方案分享
2017/04/06 Javascript
Mongoose实现虚拟字段查询的方法详解
2017/08/15 Javascript
javascript算法之二叉搜索树的示例代码
2017/09/12 Javascript
使用jquery模拟a标签的click事件无法实现跳转的解决
2018/12/04 jQuery
解决layui-open关闭自身窗口的问题
2019/09/10 Javascript
[01:46]2018完美盛典章节片——坚守
2018/12/17 DOTA
使用graphics.py实现2048小游戏
2015/03/10 Python
Python实现树的先序、中序、后序排序算法示例
2017/06/23 Python
使用pip发布Python程序的方法步骤
2018/10/11 Python
Python根据服务获取端口号的方法
2019/09/25 Python
Python数据处理篇之Sympy系列(五)---解方程
2019/10/12 Python
Pytorch使用MNIST数据集实现基础GAN和DCGAN详解
2020/01/10 Python
Python matplotlib可视化实例解析
2020/06/01 Python
带你学习Python如何实现回归树模型
2020/07/16 Python
使用css3和jquery实现可伸缩搜索框
2014/02/12 HTML / CSS
大学生求职简历的自我评价范文
2013/10/12 职场文书
群众路线教育实践活动方案
2014/02/02 职场文书
秋季运动会活动方案
2014/02/05 职场文书
大学团日活动新闻稿
2014/09/10 职场文书
2015年后备干部工作总结
2015/05/15 职场文书
关于法制教育的宣传语
2015/07/13 职场文书
中秋晚会致辞
2015/07/31 职场文书
2019XX公司员工考核管理制度!
2019/08/07 职场文书
立秋之描写立秋的作文(五年级)
2019/08/08 职场文书
为Centos安装指定版本的Docker
2022/04/01 Servers