在圣诞节或者是元旦的时候,爱编程小编给大家分享一款纯css3实现的雪人动画特效。该实例实现一个雪人跳动的特效,效果图如下:
实现的代码。
html代码:
XML/HTML Code复制内容到剪贴板- <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代码:
CSS Code复制内容到剪贴板- 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;
- rightright: 0;
- left: 0;
- margin: 300px auto;
- animation: jump 1s infinite;
- }
- .body:before {
- z-index: 2;
- 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: 4;
- 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: 5;
- 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: 6;
- }
- .body > .face {
- z-index: 3;
- 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: 0;
- left: -46px;
- transform: rotate(-15deg);
- border-top: 12px solid transparent;
- border-right: 40px solid #bf6516;
- }
- .body > .scarf {
- z-index: 3;
- 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 .rightright-arm {
- z-index: 7;
- width: 100px;
- height: 6px;
- background-color: #825a2c;
- position: absolute;
- top: 10px;
- left: -20px;
- transform: rotate(-15deg);
- animation: rub-rightright 0.5s infinite;
- }
- .body > .left-arm > .hand,
- .body .rightright-arm > .hand {
- width: 25px;
- height: 6px;
- background-color: #825a2c;
- position: absolute;
- top: -32px;
- left: -60px;
- transform: rotate(75deg);
- }
- .body > .left-arm:after,
- .body .rightright-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 .rightright-arm.left-arm {
- background-color: #a87439;
- animation: rub-left 0.5s infinite;
- top: -15px;
- z-index: 1;
- }
- .body > .left-arm.left-arm > .hand,
- .body .rightright-arm.left-arm > .hand {
- background-color: #a87439;
- top: -14px;
- transform: rotate(45deg);
- }
- .body > .left-arm.left-arm:after,
- .body .rightright-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;
- rightright: 0;
- 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: 0;
- }
- 50% {
- margin-left: 5px;
- margin-top: 1px;
- }
- 100% {
- margin-left: 0px;
- margin-top: 0;
- }
- }
- @keyframes rub-rightright {
- 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;
- }
- }
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com
暂无评论...
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?
更新日志
2024年11月19日
2024年11月19日
- 证声音乐图书馆《海风摇曳·盛夏爵士曲》[320K/MP3][63.06MB]
- 龚玥《金装龚玥HQCD》头版限量[WAV分轨]
- 李小春《吻别》萨克斯演奏经典[原抓WAV+CUE]
- 齐秦《辉煌30年24K珍藏版》2CD[WAV+CUE]
- 证声音乐图书馆《海风摇曳·盛夏爵士曲》[FLAC/分轨][321.47MB]
- 群星 《世界经典汽车音乐》 [WAV分轨][1G]
- 冷漠.2011 《冷漠的爱DSD》[WAV+CUE][1.2G]
- 陈明《流金岁月精逊【中唱】【WAV+CUE】
- 群星《Jazz-Ladies1-2爵士女伶1-2》HQCD/2CD[原抓WAV+CUE]
- 群星《美女私房歌》(黑胶)[WAV分轨]
- 郑源.2009《试音天碟》24BIT-96KHZ[WAV+CUE][1.2G]
- 飞利浦试音碟 《环球群星监听录》SACD香港版[WAV+CUE][1.1G]
- 车载音乐最强享受《车载极致女声精选CD》[WAV分轨][1G]
- 童宇.2024-爱情万年历【TOUCH音乐】【FLAC分轨】
- 黄晓君.2010-丽风金典系列VOL.1.2CD【丽风】【WAV+CUE】