在2014年的圣诞节,爱编程小编给大家分分享一款纯css3实现的雪人动画特效。该实例实现一个雪人跳动的特效,效果图如下:

在线预览   源码下载

实现的代码。

html代码:

 <span class="text">lolwut<small>-@rsmswlln</small></span>
<div class="body">
<div class="hat">
<div class="ribbon">
</div>
</div>
<div class="face">
</div>
<div class="scarf">
</div>
<div class="right-arm">
<div class="hand">
</div>
</div>
<div class="left-arm">
<div class="hand">
</div>
</div>
</div>
<div class="puddle">
</div>

css代码:

 body {
background: #c0392b;
}
.body {
width: 250px;
height: 250px;
background: #ffffff;
border-radius: 50%;
box-shadow: inset -20px -5px 35px rgba(0, 0, 0, 0.2);
position: absolute;
right:;
left:;
margin: 300px auto;
animation: jump 1s infinite;
}
.body:before {
z-index:;
content: "";
width: 180px;
height: 180px;
background: #ffffff;
border-radius: 50%;
box-shadow: inset -10px -5px 10px rgba(0, 0, 0, 0.2);
position: relative;
display: inline-block;
top: -120px;
left: 25px;
}
.body:after {
content: "";
width: 140px;
height: 140px;
background: #ffffff;
border-radius: 50%;
box-shadow: inset -10px -5px 10px rgba(0, 0, 0, 0.2);
position: relative;
display: inline-block;
top: -400px;
left: 20px;
}
.body > .hat {
width: 200px;
height: 15px;
border-radius: 50%;
background-color: #111111;
position: absolute;
z-index:;
top: -200px;
left: -15px;
}
.body > .hat:before {
content: "";
width: 100px;
height: 65px;
background-color: #111111;
display: inline-block;
position: relative;
top: -55px;
left: 51px;
}
.body > .hat:after {
z-index:;
content: "";
display: inline-block;
position: relative;
top: -145px;
left: 51px;
width: 100px;
height: 5px;
border-radius: 50%;
background-color: #2b2b2b;
}
.body > .hat > .ribbon {
height: 10px;
width: 100px;
background-color: #6d2018;
position: relative;
top: -90px;
left: 51px;
z-index:;
}
.body > .face {
z-index:;
width: 12px;
height: 12px;
background-color: #2c3e50;
border-radius: 50%;
position: absolute;
top: -170px;
left: 38px;
}
.body > .face:before {
content: "";
background-color: transparent;
display: inline-block;
position: relative;
top: 30px;
left: -45px;
transform: rotate(-15deg);
border-top: 12px solid transparent;
border-bottom: 12px solid transparent;
border-right: 40px solid #e67e22;
}
.body > .face:after {
content: "";
background-color: transparent;
display: inline-block;
position: relative;
top:;
left: -46px;
transform: rotate(-15deg);
border-top: 12px solid transparent;
border-right: 40px solid #bf6516;
}
.body > .scarf {
z-index:;
width: 150px;
height: 30px;
background-color: #2980b9;
position: absolute;
top: -110px;
left: 25px;
transform: rotate(-15deg);
border-radius: 20%;
}
.body > .scarf:after {
content: "";
width: 75px;
height: 30px;
background-color: #2980b9;
display: inline-block;
position: relative;
top: 16px;
left: 80px;
transform: rotate(85deg);
border-radius: 20%;
}
.body > .left-arm,
.body .right-arm {
z-index:;
width: 100px;
height: 6px;
background-color: #825a2c;
position: absolute;
top: 10px;
left: -20px;
transform: rotate(-15deg);
animation: rub-right 0.5s infinite;
}
.body > .left-arm > .hand,
.body .right-arm > .hand {
width: 25px;
height: 6px;
background-color: #825a2c;
position: absolute;
top: -32px;
left: -60px;
transform: rotate(75deg);
}
.body > .left-arm:after,
.body .right-arm:after {
content: "";
width: 75px;
height: 6px;
background-color: #a87439;
display: inline-block;
position: relative;
top: -24px;
left: -70px;
transform: rotate(25deg);
}
.body > .left-arm.left-arm,
.body .right-arm.left-arm {
background-color: #a87439;
animation: rub-left 0.5s infinite;
top: -15px;
z-index:;
}
.body > .left-arm.left-arm > .hand,
.body .right-arm.left-arm > .hand {
background-color: #a87439;
top: -14px;
transform: rotate(45deg);
}
.body > .left-arm.left-arm:after,
.body .right-arm.left-arm:after {
background-color: #825a2c;
transform: rotate(5deg);
top: -12px;
left: -74px;
}
.puddle {
z-index: -1;
width: 200px;
height: 100px;
background: #2980b9;
border-radius: 50%;
position: absolute;
right:;
left: -50px;
margin: 500px auto;
}
.puddle:after {
content: "";
width: 120px;
height: 80px;
display: inline-block;
border-radius: 50%;
left: 150px;
position: relative;
background-color: #2980b9;
}
.text {
text-align: center;
font-family: 'Lobster', cursive;
font-size: 74px;
display: inline-block;
transform: rotate(-15deg);
position: absolute;
margin: 50px 30px;
color: #ffffff;
text-shadow: 3px 3px 2px rgba(0, 0, 0, 0.5);
}
.text > small {
font-size: 20px;
display: block;
}
@keyframes rub-left {
0% {
margin-left: 0px;
margin-top:;
}
50% {
margin-left: 5px;
margin-top: 1px;
}
100% {
margin-left: 0px;
margin-top:;
}
}
@keyframes rub-right {
0% {
margin-left: 4px;
}
50% {
margin-left: 0px;
}
100% {
margin-left: 4px;
}
}
@keyframes jump {
0% {
margin: 300px auto;
}
40% {
margin: 250px auto;
}
80% {
margin: 300px auto;
}
}

via:http://www.w2bc.com/Article/13508

2014圣诞节一款纯css3实现的雪人动画特效的更多相关文章

  1. 纯css3 加载loading动画特效

    最近项目中要实现当页面还没有加载完给用户提示正在加载的loading,本来是想做个图片提示的,但是图片如果放大电脑的分辨率就会感觉到很虚,体验效果很不好.于是就采用css3+js实现这个loading ...

  2. 纯CSS3绘制神奇宝贝伊布动画特效

    在线演示       本地下载

  3. 纯css3实现的文字亮光特效

    今天给大家分享一款纯css3实现的文字亮光特效.这款特效文字上一道亮光逐渐扫过文字.效果非常漂亮.一起看下效果: 在线预览   源码下载 实现的代码. html代码: <span class=& ...

  4. 推荐10款纯css3实现的实用按钮

    在2014年的双11即将来临之季,爱编程小编为大家整理10款纯css3实现的按钮.希望这对坚守在前端的码农们有所帮助.亲,如果你有好的资源也可在本文留言,让从事编码的程序员们抱团.工作更轻松. No1 ...

  5. 一款纯css3实现的条纹加载条

    之前为大家带来了很多加载动画. 基于prefixfree.js的进度加载条 ,基于jquery带百分比的响应式进度加载条.今天给大家分享一款纯css3实现的条纹加载条.带有响应式的效果.效果图如下 : ...

  6. 7款纯CSS3实现的炫酷动画应用

    1.纯CSS3实现人物摇头动画 这次我们要来分享一款超级可爱的纯CSS3人物摇头动画,初始化的时候人物的各个部位是利用CSS3动画效果拼接而成,接下来就是人物听音乐的场景,一边听音乐一边摇着脑袋,十分 ...

  7. 7款纯CSS3实现的炫酷动画应用|慕课网只学有用的!

    关于我们 | 时尚廊 ♦ 时尚廊,中国大陆地区首家以"Lounge"为概念的艺文空间 ♦  7款纯CSS3实现的炫酷动画应用|慕课网只学有用的! 7款纯CSS3实现的炫酷动画应用

  8. 16款纯CSS3实现的loading加载动画

    分享16款纯CSS3实现的loading加载动画.这是一款实用的可替代GIF格式图片的CSS3加载动画代码.效果图如下: 在线预览   源码下载 实现的代码. html代码: <div clas ...

  9. 一款纯css3实现的漂亮的404页面

    之前为大家分享了那些创意有趣的404页面, html5和css3打造一款创意404页面, HTML5可爱的404页面动画很逗的机器人.今天再给大家分享一款纯css3实现的漂亮的404页面.效果图如下: ...

随机推荐

  1. SQL OUTER JOIN

    When we want to select out all the record from two table, no matter it's present at second table or ...

  2. 从AIDL开始谈Android进程间Binder通信机制

    转自: http://tech.cnnetsec.com/585.html 本文首先概述了Android的进程间通信的Binder机制,然后结合一个AIDL的例子,对Binder机制进行了解析. 概述 ...

  3. Report Studio中树提示如何使用

    环境:比如在一个销售数据里面,用户既要选择年,又要选择月,还要选择日,或者是随意选择其中的一个作为筛选条件,如果是Cube的话是可以通过拖拉不同的维度层级来实现该功能的,但是如果是FM开发的DMR模型 ...

  4. Android + Eclipse + PhoneGap 3.4 安卓最新环境配置,部分资料整合网上资料,已成功安装.

    前言:广州花都论坛,打算推出本地服务o2o应用.快速开发手机应用,phonegap 我的小站,http://www.w30.cn/ 如果有什么问题也可以到小组留言,可以的话,贡献一个ip:) phon ...

  5. TP框架中ajax post请求时提示404

    ajax post请求时提示404错误 TP框架中ajax post请求时提示404 找了半天是 控制器中方法有错误! 下次再遇到去控制器方法中找一步一步找,肯定能找到,我是单词拼错了!

  6. ThreadPoolExecutor中策略的选择与工作队列的选择(java线程池)

    工作原理 1.线程池刚创建时,里面没有一个线程.任务队列是作为参数传进来的.不过,就算队列里面有任务,线程池也不会马上执行它们. 2.当调用 execute() 方法添加一个任务时,线程池会做如下判断 ...

  7. windows vbs启动多个应用程序并使程序最小化(显示桌面)

      windows vbs启动多个应用程序并使程序最小化(显示桌面) CreationTime--2018年7月26日11点18分 Author:Marydon 1.应用场景 每天开机后,都需要打开平 ...

  8. 通过LDAP验证Active Directory服务

    原文地址:http://www.byywee.com/page/M0/S215/215725.html C#: using System; using System.Collections.Gener ...

  9. UML基础——统一建模语言简介

    到了21世纪——准确地说是2003年,UML已经获得了业界的认同.在我所见过的专业人员的简历中,75%都声称具备UML的知识.然而,在同绝大多数求职人员面谈之后,可以明显地看出他们并不真正了解UML. ...

  10. FFmpeg 如何探测网络流格式/如何从内存中获取数据

    文章转自:http://blog.csdn.net/rootusers/article/details/42551935 一般ffmpeg都是直接从文件中读取或者从网络流中读取,比如rtp://xx. ...