前言

很不巧前天突然就感冒了,都怪自己吃太多饼干导致上火了。整个人都无精打采。本来想多做几个兔斯基表情的,但身体发热很难受。所以就只完成一个简单点的表情耍一耍。

正文

先看一下这个简单到不能再简单的小表情吧:

这里我就直接分享代码吧:

html结构:

<div class="tuzki_container">
<div class="tuzki">
<div class="leftear"></div>
<div class="rightear"></div>
<div class="header">
<div class="lefteye"></div>
<div class="righteye"></div>
<div class="leftcheek"></div>
<div class="rightcheek"></div>
</div>
<div class="body"></div>
<div class="hearts">
<div class="heart"></div>
</div>
</div>
</div>

这个结构还是很简单的,毕竟兔斯基就是简单的线稿表情。主要还是人为的给它赋予动画,带入一种有特定情境的表情。

下面就给它设置css样式:

头部(包括眼睛和脸颊):

.tuzki_container{
position:relative;
}
.tuzki{
width:220px;
height:300px;
margin:50px auto;
position: relative;
overflow:hidden;
}
.header{
width:194px;
height:170px;
background:#fff;
border:8px solid #000;
border-radius:194px/170px;
-webkit-transform:rotate(2deg);
-moz-transform:rotate(2deg);
-o-transform:rotate(2deg);
-ms-transform:rotate(2deg);
transform:rotate(2deg);
position: absolute;
top:45px;
left:;
overflow:hidden;
z-index:;
}
.header:before{
content:'';
display:block;
width:200px;
height:140px;
border-bottom:40px solid rgba(198,207,212,0.7);
border-radius:150px;
margin-top:-5px;
z-index:;
position:absolute;
}
.header .lefteye,.header .righteye{
width:58px;
height:8px;
background:#000;
border-radius:5px;
-webkit-transform:rotate(5deg);
-moz-transform:rotate(5deg);
-o-transform:rotate(5deg);
-ms-transform:rotate(5deg);
transform:rotate(5deg);
position: absolute;
top:70px;
left:10px;
}
.header .righteye{
top:78px;
left:100px;
}
.leftcheek{
width:26px;
height:26px;
background:#ff6666;
border-radius:50%;
box-shadow:0 0 5px #ff6666;
position: absolute;
top:95px;
left:3px;
opacity:0.9;
-webkit-animation:cheekscale 1s ease-out infinite;
-moz-animation:cheekscale 1s ease-out infinite;
-o-animation:cheekscale 1s ease-out infinite;
-ms-animation:cheekscale 1s ease-out infinite;
animation:cheekscale 1s ease-out infinite;
}
.rightcheek{
width:30px;
height:30px;
background:#ff6666;
border-radius:50%;
box-shadow:0 0 5px #ff6666;
position: absolute;
top:105px;
left:140px;
opacity:0.9;
-webkit-animation:cheekscale 1s ease-out infinite;
-moz-animation:cheekscale 1s ease-out infinite;
-o-animation:cheekscale 1s ease-out infinite;
-ms-animation:cheekscale 1s ease-out infinite;
animation:cheekscale 1s ease-out infinite;
}
@-webkit-keyframes cheekscale {
0%{
-webkit-transform:scale(1);
opacity:;
}
100%{
-webkit-transform:scale(1.1);
box-shadow:0 0 10px #ff6666;
opacity:0.6;
}
}
@-moz-keyframes cheekscale {
0%{
-moz-transform:scale(1);
opacity:;
}
100%{
-moz-transform:scale(1.1);
box-shadow:0 0 10px #ff6666;
opacity:0.6;
}
}
@-o-keyframes cheekscale {
0%{
-o-transform:scale(1);
opacity:;
}
100%{
-o-transform:scale(1.1);
box-shadow:0 0 10px #ff6666;
opacity:0.6;
}
}
@-ms-keyframes cheekscale {
0%{
-ms-transform:scale(1);
opacity:;
}
100%{
-ms-transform:scale(1.1);
box-shadow:0 0 10px #ff6666;
opacity:0.6;
}
}
@keyframes cheekscale {
0%{
transform:scale(1);
opacity:;
}
100%{
transform:scale(1.1);
box-shadow:0 0 10px #ff6666;
opacity:0.6;
}
}

耳朵:

.leftear{
width:22px;
height:50px;
border:7px solid #000;
border-radius:34px/62px;
position:absolute;
top:2px;
left:75px;
-webkit-transform:rotate(6deg);
-moz-transform:rotate(6deg);
-o-transform:rotate(6deg);
-ms-transform:rotate(6deg);
transform:rotate(6deg);
}
.rightear{
width:22px;
height:80px;
background:#fff;
border:7px solid #000;
border-top-left-radius:34px 62px;
border-top-right-radius:34px 62px;
border-bottom-left-radius:34px 100px;
border-bottom-right-radius:34px 100px;
-webkit-transform:rotate(20deg);
-moz-transform:rotate(20deg);
-o-transform:rotate(20deg);
-ms-transform:rotate(20deg);
transform:rotate(20deg);
position:absolute;
left:140px;
top:3px;
z-index:;
}
.rightear:after{
content:'';
display:block;
width:30px;
height:15px;
background:#fff;
position: absolute;
bottom:-7px;
left:-5px;
}

身体:

.body{
width:100px;
height:100px;
background:#fff;
border:8px solid #000;
border-left:6px solid #000;
border-top-left-radius:54px 130px;
border-top-right-radius:54px 130px;
border-bottom-left-radius:20px 100px;
border-bottom-right-radius:20px 100px;
-webkit-transform:rotate(-3deg);
-moz-transform:rotate(-3deg);
-o-transform:rotate(-3deg);
-ms-transform:rotate(-3deg);
transform:rotate(-3deg);
position: absolute;
top:215px;
left:65px;
}
.body:before{
content:'';
display:block;
width:40px;
height:100px;
border:7px solid #000;
border-right:none;
border-top:none;
border-top-left-radius:30px 50px;
border-top-right-radius:30px 50px;
border-bottom-left-radius:24px 80px;
-webkit-transform:rotate(19deg);
-moz-transform:rotate(19deg);
-o-transform:rotate(19deg);
-ms-transform:rotate(19deg);
transform:rotate(19deg);
position: absolute;
left:-19px;
top:-2px;
}
.body:after{
content:'';
display:block;
width:20px;
height:60px;
border-right:6px solid #000;
border-radius:50px;
position: absolute;
left:57px;
top:30px;
}

心形:

.heart,.heart:before{
display: inline-block;
width: 20px;
height: 30px;
border-radius: 10px;
background: #ff6666;
position: absolute;
top:-10px;
left:12.7px;
-webkit-transform-origin: bottom right;
-moz-transform-origin: bottom right;
-o-transform-origin: bottom right;
-ms-transform-origin: bottom right;
transform-origin: bottom right;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.heart:before{
content: '';
-webkit-transform-origin: bottom left;
-moz-transform-origin: bottom left;
-o-transform-origin: bottom left;
-ms-transform-origin: bottom left;
transform-origin: bottom left;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-o-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
top:-18px;
left:2px;
}
.heart:after{
content: '';
width:;
height:;
border-left:10.8px solid transparent;
border-right:10.8px solid transparent;
border-top:12px solid #ff6666;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
position: absolute;
top:22.6px;
left:-7.3px;
}
.hearts{
opacity:;
-webkit-transform:rotate(-30deg) translate3d(-10px,-15px,0);
-moz-transform:rotate(-30deg) translate3d(-10px,-15px,0);
-o-transform:rotate(-30deg) translate3d(-10px,-15px,0);
-ms-transform:rotate(-30deg) translate3d(-10px,-15px,0);
transform:rotate(-30deg) translate3d(-10px,-15px,0);
-webkit-animation:heartmove 1s ease-in infinite;
-moz-animation:heartmove 1s ease-in infinite;
-o-animation:heartmove 1s ease-in infinite;
-ms-animation:heartmove 1s ease-in infinite;
animation:heartmove 1s ease-in infinite;
}
@-webkit-keyframes heartmove {
0%{
opacity:;
-webkit-transform:rotate(-30deg) translate3d(-10px,-15px,0);
}
100%{
opacity:0.6;
-webkit-transform:rotate(-30deg) translate3d(-10px,-25px,0);
}
}
@-moz-keyframes heartmove {
0%{
opacity:;
-moz-transform:rotate(-30deg) translate3d(-10px,-15px,0);
}
100%{
opacity:0.6;
-moz-transform:rotate(-30deg) translate3d(-10px,-25px,0);
}
}
@-o-keyframes heartmove {
0%{
opacity:;
-o-transform:rotate(-30deg) translate3d(-10px,-15px,0);
}
100%{
opacity:0.6;
-o-transform:rotate(-30deg) translate3d(-10px,-25px,0);
}
}
@-ms-keyframes heartmove {
0%{
opacity:;
-ms-transform:rotate(-30deg) translate3d(-10px,-15px,0);
}
100%{
opacity:0.6;
-ms-transform:rotate(-30deg) translate3d(-10px,-25px,0);
}
}
@keyframes heartmove {
0%{
opacity:;
transform:rotate(-30deg) translate3d(-10px,-15px,0);
}
100%{
opacity:0.6;
transform:rotate(-30deg) translate3d(-10px,-25px,0);
}
}

PS:因为兔斯基很多表情都基于同一个身体,通过不同动画来表现的,所以如果想做流泪的表情,只需要把动画部分换成流眼泪就行了,其他部分可以不做修改。就是这么简单!

若需转载,请注明出处,谢谢合作!

纯CSS3实现兔斯基简单害羞表情的更多相关文章

  1. 纯CSS3实现的一些酷炫效果

    之前在网上看到一些用纯CSS3实现的酷炫效果,以为实现起来比较困难,于是想看看具体是怎么实现的. 一.笑脸猫动画 实现效果如下: 这个实现起来确实比较麻烦,很多地方需要花时间,有耐心地调整. 1.先看 ...

  2. 纯css3圆形从中心向四周扩散动画效果

    查看效果:http://hovertree.com/texiao/css3/37/ 先来个简单的示例,例如: @keyframes hovertreemove{from {top:30px;}to { ...

  3. 纯css3艺术文字样式效果代码

    效果:http://hovertree.com/texiao/css3/1/ 本效果主要使用text-shadow实现.参考:http://hovertree.com/h/bjaf/css3_text ...

  4. 纯CSS3写的10个不同的酷炫图片遮罩层效果【转】

    这个是纯CSS3实现的的10个不同的酷炫图片遮罩层效果,可以欣赏一下 在线预览 下载地址 实例代码 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...

  5. 纯CSS3写的10个不同的酷炫图片遮罩层效果

    这个是纯CSS3实现的的10个不同的酷炫图片遮罩层效果,可以欣赏一下 在线预览 下载地址 实例代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1 ...

  6. 纯CSS3大转盘抽奖(响应式、可配置)

    源于前段时候微信小程序最初火爆公测时段,把以前用 Canvas 实现的大转盘抽奖移植成微信小程序,无奈当时小程序对 Canvas 支持不够完善,只好降低用 CSS3 实现.虽然比不上 Canvas 绘 ...

  7. 8个超炫酷的纯CSS3动画及源码分享

    在现代网页中,我们已经越来越习惯使用大量的CSS3元素,而现在的浏览器也基本都支持CSS3,所以很多时候我们不妨思考一下是否可以用纯CSS3制作一些有趣或者实用的网页.本文要分享8个超炫酷的纯CSS3 ...

  8. 纯css3写的仿真图书翻页效果

    对css3研究越深入,越觉得惊艳.css3说不上是万能的,但是它能实现的效果也超出了我的想象.它的高效率和动画效果的流畅性很多情况下能替代js的作用.个人习惯css3能实现的效果就不会用js,虽然在国 ...

  9. 【Web前沿技术】纯 CSS3 打造的10个精美加载进度条动画

    之前向大家介绍8款优秀的 jQuery 加载动画和进度条插件,今天这篇文章向大家推荐10个纯 CSS3 代码实现精美加载进度条动画效果的方案.加载动画和进度条在网站和 Web 应用中的使用非常流行,特 ...

随机推荐

  1. SVG基础图形与参数

    SVG是什么 SVG 指可伸缩矢量图形 (Scalable Vector Graphics) SVG 用来定义WEB上使用的矢量图 SVG 使用 XML 格式定义图形 SVG 图像在缩放时其图形质量不 ...

  2. jQuery对复选框(checkbox)的全选,全不选,反选等的操作

    效果截图: HTML代码: <body><ul id="list"> <li><label><input type=" ...

  3. 【高级功能】使用canvas元素(第二部分)

    本文将继续介绍canvas的功能,展示如何绘制更复杂的图形(包括圆弧和曲线),如何使用剪裁区域来限制操作以及如何绘制文本.还是介绍可以应用在画布上的特效和变换,包括阴影.透明度.旋转和坐标重映射. 1 ...

  4. RecyclerView添加头部和底部视图的实现

    ListView是有addHeaderView和 addFooterView两个方法的. 但是作为官方推荐的ListView的升级版RecyclerView缺无法实现这两个方法. 那么如果使用Recy ...

  5. PL/SQL基础1(笔记)

    --基本结构DECLARE--变量声明部分:在此声明PL/SQL用到的变量,类型,游标,以及局部的存储过程和函数BEGIN --执行部分:过程及SQL语句,即程序的主要部分 EXCEPTION --执 ...

  6. iOS多线程-05-多图下载

    效果图 常见问题及解决方法 图片重复下载 将内存保存在内存或沙盒中. 若下载的图片量较大,则会出现UI界面不流畅的现象 在子线程中执行下载操作,然后回到主线程成中进行UI界面的刷新. 由于cell的循 ...

  7. android 之 adb 启动问题的一般解决办法

    有时,当我们打开eclipse准备运行Android项目时,虚拟机会启动不了,并且会出现下面的报错. [2015-10-07 16:47:46 - Game2048] ---------------- ...

  8. 怎样查看linux版本

    玩一台新的linux服务器,首先要做的,就是先看下是什么版本的系统: 命令如下: 登录到linux执行cat /etc/redhat-release ,例如如下: [root@3.5.5Biz-46 ...

  9. 获取微信openID 的步骤

    获取微信openid的步骤:1.进入-->判断openID是否为空: 空-->$url=urlencode("http://xxx/xxx.php");//回调链接 $ ...

  10. 烂泥:KVM利用LVM快照快速部署虚拟机

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. 上一篇文章介绍了有关KVM利用LVM快照备份和恢复虚拟机的功能,这篇文章我们来介绍,如何利用LVM快照功能为KVM快速部署虚拟机. 部署虚拟机需要以下几 ...