您现在的位置是:网站首页> 编程资料编程资料
CSS3制作皮卡丘动画壁纸的示例纯css3制作的发光loading图标加载动画特效源码CSS3实现彩色进度条动画的示例基于css3制作秋天落叶主题动画特效代码CSS3 实现弹跳的小球动画纯CSS3制作的圆形修边渐变按钮动画特效源码纯CSS3实现的文件夹悬停打开动画特效源码CSS3文字图标组合悬停UI动画特效源码纯CSS3绘制摇尾巴的小黄狗动画特效纯CSS3黑白线框按钮动画特效html5+css3实现鼠标悬停图文卡片动画特效
2023-10-17
382人已围观
简介 这篇文章主要介绍了CSS3制作皮卡丘动画壁纸的示例,帮助大家更好的理解和制作CSS3特效,感兴趣的朋友可以了解下
正文
OK,接下来就是晒效果图的时候了,看图后才有兴趣了解一下,不然很沉闷,没什么心思看了。

PS:由于我这个动画的尺寸做得比较大(720 x 1280),所以为了能录这个gif动画,我缩小了一倍。但是其实按原尺寸看效果会更好一些,这个的话,可以在文章结尾处我提供的地址下载。
言归正传,其实这个动画效果并不难,大家可以看到这个结构是非常简单清晰的。不过虽然简单,但是呈现出来的效果还是很不错的,这也是我为什么愿意做的原因。
好的,既然这么简单,就来看一下我实现它的html结构吧:
09:0009:00
2015年 9月3日
比卡丘可爱手机壁纸
结构主线还是比较清晰的,整体上分为顶部电池和时间,中部的时间日期,还有皮卡丘的身体。而皮卡丘的身体又分为眼睛,鼻子,嘴巴,脸颊,双手和球。
把html结构搭建好了之后,就可以根据自己对该图测量出来的各部分的尺寸进行CSS样式的编写。
那么接下来我就把每一个部分的CSS实现代码分享给大家:
首先初始化一下
*{ margin:0; padding:0; } body{ font-family:"微软雅黑"; color:#fff; } .pikachu_container{ width:720px; height:1280px; background:rgb(251,205,60); position:relative; overflow:hidden; margin:0 auto; }顶部电池和时间
.pikachu_container .header{ width:100%; height:50px; line-height:50px; position:relative; top:0; left:0; } .pikachu_container .header .header_main{ width:160px; height:100%; position:absolute; right:0; top:0; font-size:30px; overflow:hidden; } .header .header_main .battery{ display:inline-block; width:34px; height:18px; border:3px solid #fff; border-radius:5px; position:absolute; top:50%; left:23px; margin-top:-12px; } .header .header_main .battery:after{ content:''; display:inline-block; width:5px; height:14px; background:#fff; position: absolute; top:2px; right:2px; -webkit-animation:charging 2s linear infinite; -moz-animation:charging 2s linear infinite; -o-animation:charging 2s linear infinite; -ms-animation:charging 2s linear infinite; animation:charging 2s lineat infinite; } @-webkit-keyframes charging{ 0%{ width:5px; } 100%{ width:30px; } } @-moz-keyframes charging{ 0%{ width:5px; } 100%{ width:30px; } } @-o-keyframes charging{ 0%{ width:5px; } 100%{ width:30px; } } @-ms-keyframes charging{ 0%{ width:5px; } 100%{ width:30px; } } @keyframes charging{ 0%{ width:5px; } 100%{ width:30px; } } .header .header_main .battery:before{ content:''; display:block; width:3px; height:12px; background:#fff; border-top-left-radius:4px; border-bottom-left-radius:4px; position: absolute; top:3px; left:-6px; } .header .header_main .clock{ position: absolute; right:14px; top:0; }中部的日期和时间
.pikachu_container .time{ width:100%; height:250px; position: relative; top:70px; left:0; text-align:center; } .pikachu_container .time h1{ font-size:90px; letter-spacing:8px; text-shadow:-1px 2px 3px rgba(0,0,0,0.5); } .pikachu_container .time p:nth-of-type(1){ font-size:30px; margin-top:10px; } .pikachu_container .time p:nth-of-type(2){ font-size:26px; margin-top:8px; -webkit-animation:textShake 1s infinite; -moz-animation:textShake 1s infinite; -o-animation:textShake 1s infinite; -ms-animation:textShake 1s infinite; animation:textShake 1s infinite; } @-webkit-keyframes textShake{ 0%,20%,40%,60%,80%,100%{ -webkit-transform:rotate(1deg) translate3d(2px,-2px,0); } 5%,15%,25%,35%,45%,55%,65%,75%,85%,95%{ -webkit-transform:rotate(0deg) translate3d(0px,0px,0); } 10%,30%,50%,70%,90%{ -webkit-transform:rotate(-1deg) translate3d(-2px,2px,0); } } @-moz-keyframes textShake{ 0%,20%,40%,60%,80%,100%{ -moz-transform:rotate(1deg) translate3d(2px,-2px,0); } 5%,15%,25%,35%,45%,55%,65%,75%,85%,95%{ -moz-transform:rotate(0deg) translate3d(0px,0px,0); } 10%,30%,50%,70%,90%{ -moz-transform:rotate(-1deg) translate3d(-2px,2px,0); } } @-o-keyframes textShake{ 0%,20%,40%,60%,80%,100%{ -o-transform:rotate(1deg) translate3d(2px,-2px,0); } 5%,15%,25%,35%,45%,55%,65%,75%,85%,95%{ -o-transform:rotate(0deg) translate3d(0px,0px,0); } 10%,30%,50%,70%,90%{ -o-transform:rotate(-1deg) translate3d(-2px,2px,0); } } @-ms-keyframes textShake{ 0%,20%,40%,60%,80%,100%{ -ms-transform:rotate(1deg) translate3d(2px,-2px,0); } 5%,15%,25%,35%,45%,55%,65%,75%,85%,95%{ -ms-transform:rotate(0deg) translate3d(0px,0px,0); } 10%,30%,50%,70%,90%{ -ms-transform:rotate(-1deg) translate3d(-2px,2px,0); } } @keyframes textShake{ 0%,20%,40%,60%,80%,100%{ transform:rotate(1deg) translate3d(2px,-2px,0); } 5%,15%,25%,35%,45%,55%,65%,75%,85%,95%{ transform:rotate(0deg) translate3d(0px,0px,0); } 10%,30%,50%,70%,90%{ transform:rotate(-1deg) translate3d(-2px,2px,0); } }皮卡丘的眼睛
.pikachu_container .body{ width:100%; height:940px; position: relative; top:50px; left:0; } .body .eyes{ position: relative; } .body .eyes .leftEye,.body .eyes .rightEye{ width:85px; height:85px; border:5px solid rgb(2,0,1); background:rgb(51,51,51); border-radius:50%; position: absolute; top:40px; } .body .eyes .leftEye{ left:150px; } .body .eyes .rightEye{ right:150px; } .body .eyes .leftEye:after,.body .eyes .rightEye:after{ content:''; display:block; width:40px; height:40px; background:#fff; border:5px solid rgb(2,0,1); border-radius:50%; position:absolute; top:2px; left:2px; -webkit-animation:eyeMove 3s infinite; -moz-animation:eyeMove 3s infinite; -o-animation:eyeMove 3s infinite; -ms-animation:eyeMove 3s infinite; animation:eyeMove 3s infinite; } @-webkit-keyframes eyeMove{ 0%,100%{ top:2px; left:2px; } 30%,60%,70%{ top:0px; left:17px; } 40%{ top:0px; left:21px; } 50%{ top:0px; left:13px; } 80%,90%{ top:17px; left:17px; } } @-moz-keyframes eyeMove{ 0%,100%{ top:2px; left:2px; } 30%,60%,70%{ top:0px; left:17px; } 40%{ top:0px; left:21px; } 50%{ top:0px; left:13px; } 80%,90%{ top:17px; left:17px; } } @-o-keyframes eyeMove{ 0%,100%{ top:2px; left:2px; } 30%,60%,70%{ top:0px; left:17px; } 40%{ top:0px; left:21px; } 50%{ top:0px; left:13px; } 80%,90%{ top:17px; left:17px; } } @-ms-keyframes eyeMove{ 0%,100%{ top:2px; left:2px; } 30%,60%,70%{ top:0px; left:17px; } 40%{ top:0px; left:21px; } 50%{ top:0px; left:13px; } 80%,90%{ top:17px; left:17px; } } @keyframes eyeMove{ 0%,100%{ top:2px; left:2px; } 30%,60%,70%{ top:0px; left:17px; } 40%{ top:0px; left:21px; } 50%{ top:0px; left:13px; } 80%,90%{ top:17px; left:17px; } }皮卡丘的鼻子
.body .nose{ position:absolute; width:28px; height:18px; background:rgb(51,51,51); border:4px solid rgb(2,0,1); border-radius:36px/26px; left:50%; top:100px; margin-left:-18px; -webkit-animation:noseMove 3s infinite; -moz-animation:noseMove 3s infinite; -o-animation:noseMove 3s infinite; -ms-animation:noseMove 3s infinite; animation:noseMove 3s infinite; } @-webkit-keyframes noseMove{ 0%,49%,51%,100%{ width:28px; height:18px; margin-left:-18px; } 50%{ width:34px; height:20px; margin-left:-21px; } } @-moz-keyframes noseMove{ 0%,49%,51%,100%{ width:28px; height:18px; margin-left:-18px; } 50%{ width:34px; height:20px; margin-left:-21px; } } @-o-keyframes noseMove{ 0%,49%,51%,100%{ width:28px; height:18px; margin-left:-18px; } 50%{ width:34px; height:20px; margin-left:-21px; } } @-ms-keyframes noseMove{ 0%,49%,51%,100%{ width:28px; height:18px; margin-left:-18px; } 50%{ width:34px; height:20px; margin-left:-21px; } } @keyframes noseMove{ 0%,49%,51%,100%{ width:28px; height:18px; margin-left:-18px; } 50%{ width:34px; height:20px; margin-left:-21px; } }皮卡丘的脸颊
.body .cheek{ position: relative; } .body .cheek .leftCheek,.body .cheek .rightCheek{ width:120px; height:120px; border:5px solid rgb(2,0,1); background:rgb(231,74,57); border-radius:50%; position: absolute; top:170px; -webkit-animation:cheekMove 3s infinite; -moz-animation:cheekMove 3s infinite; -o-animation:cheekMove 3s infinite; -ms-animation:cheekMove 3s infinite; animation:cheekMove 3s infinite; } @-webkit-keyframes cheekMove{ 0%,46%,54%,100%{ width:120px; height:120px; top:170px; } 50%{ width:100px; height:100px; top:180px; } } @-moz-keyframes cheekMove{ 0%,46%,54%,100%{ width:120px; height:120px; top:170px; } 50%{ width:100px; height:100px; top:180px; } } @-o-keyframes cheekMove{ 0%,46%,54%,100%{ width:120px; height:120px; top:170px; } 50%{ width:100px; height:100px; top:180px; } } @-ms-keyframes cheekMove{ 0%,46%,54%,100%{ width:120px; height:120px; top:170px; } 50%{ width:100px; height:100px; top:180px; } } @keyframes cheekMove{ 0%,46%,54%,100%{ width:120px; height:120px; top:170px; } 50%{ width:100px; height:100px; top:180px; } } .body .cheek .leftCheek{ left:60px; } .body .cheek .rightCheek{ right:60px; }皮卡丘的嘴巴
.body .mouth{ position: relative; width:180px; height:220px; left:50%; top:180px; margin-left:-90px; } .body .mouth .mouth_main{ position: absolute; left:0; top:0px; width:180px; height:220px; background:rgb(132,37,41); border:4px solid rgb(2,0,1); border-top-right-radius:15px 15px; border-bottom-left-radius: 250px 570px; border-bottom-right-radius: 250px 590px; overflow:hidden; -webkit-animation:mouthMove 3s
相关内容
- CSS常用的封装方法汇总CSS学习笔记之常用Mixin封装实例代码GenJS v2.0 纯Html/CSS+JS封装的Div弹出窗口类TBCompressor 基于YUICompressor的淘宝封装的css和js压缩工具CSS 圆角框进行JS封装版
- CSS实现鼠标滑过卡片上浮效果的示例html5+css3实现鼠标悬停图文卡片动画特效css实现网页右下角点赞小卡片效果(实例代码)CSS实现卡片切换效果CSS3 实现响应鼠标移动背景图片漂移效果的用户介绍卡片源码css3卡片折叠打开ui动画效果原生js+css3制作的卡片自动翻转特效源码jQuery css3实现响应式图文卡片滚动轮播特效HTML5+CSS3实现眼珠子跟随鼠标移动而转动的用户信息卡片效果源码css3制作倾斜视差图片卡片特效源码css3鼠标hover悬停卡片动画特效
- 如何使用css实现数据热点效果CSS Transition通过改变Height实现展开收起元素从QQtabBar看css命名规范BEM的详细介绍css实现两栏布局,左侧固定宽,右侧自适应的多种方法CSS 实现Chrome标签栏的技巧CSS实现两列布局的N种方法CSS实现隐藏搜索框功能(动画正反向序列)CSS3中Animation实现简单的手指点击动画的示例详解CSS中的特指度和层叠问题详解overflow:hidden的作用(溢出隐藏、清除浮动、解决外边距塌陷)关于CSS浮动与取消浮动的问题
- 详解background属性的8个属性值(面试题)CSS3 background-image颜色渐变的实现代码CSS3混合模式mix-blend-mode/background-blend-mode简介css3实现一个div设置多张背景图片及background-image属性实例演示CSS的background属性及CSS3的背景图片设置总结使用CSS3来实现滚动视差效果的教程CSS3属性background-size使用指南css3中背景尺寸background-size详解
- css3实现二维码扫描特效的示例CSS3 实现雷达扫描图的示例代码HTML5+CSS3从入门到精通(标准版) 未来科技 高清pdf扫描版[248MB]CSS3 DIV网页样式与布局:从入门到精通 中文pdf扫描版[185MB] 从零开始学HTML5+CSS3 (胡晓霞等) 高清pdf扫描版[175MB]CSS3实现的模仿雷达扫描效果动画源码图解CSS3:核心技术与案例实战 (大漠著) PDF扫描版[76MB]CSS3实现网页右侧悬浮固定二维码扫描与在线客服等功能特效源码
- CSS3实现彩色进度条动画的示例CSS3实现渐变的loading加载进度条特效代码jQuery+CSS3实现的双层圆环形进度条加载动画特效利用css3实现进度条效果及动态添加百分比纯css3实现的百分比渐变进度条加载动画特效源码CSS3+SVG实现S形进度条加载动画效果源码使用CSS3实现环形进度条效果基于jQuery+css3实现下载按钮进度条特效源码css3 clip实现圆环进度条的示例代码css 进度条的文字根据进度渐变的示例代码纯CSS3 Bootstrap进度条动画样式特效
- 解决CSS3 transition-delay 属性默认值0不带单位失效的问题css3中transform属性实现的4种功能详解CSS3.0(Cascading Style Sheet) 层叠级联样式表纯CSS3实现div按照顺序出入效果CSS3实现列表无限滚动/轮播效果css3 利用transform-origin 实现圆点分布在大圆上布局及旋转特效CSS3实现的侧滑菜单CSS3实现的3D隧道效果用CSS3画一个爱心css3 实现文字闪烁效果的三种方式示例代码六种css3实现的边框过渡效果
- 全民英雄三星难度暗月林地通关攻略_全民英雄三星难度暗月林地怎么打_手机游戏_游戏攻略_
- 永恒战士3 橙色武器如何获得 橙色武器的获得方法_手机游戏_游戏攻略_
- 全民英雄无限刷紫卡碎片的方法技巧_全民英雄怎么无限刷紫卡碎片_手机游戏_游戏攻略_
点击排行
本栏推荐
