用css写个android机器人代码分享

所属分类: 网页制作 / CSS 阅读数: 1678
收藏 0 赞 0 分享


复制代码
代码如下:

<span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"></span><pre code_snippet_id="75788" snippet_file_name="blog_20131121_2_1289480" name="code" class="html"><pre code_snippet_id="75788" snippet_file_name="blog_20131121_2_1289480" name="code" class="html"><!DOCTYPE>
<html>
<head></head>
<style type="text/css">
.android{
position: absolute;
left: 500px;
top: 200px;
}
/* head */
.head{
width: 336px;
height: 155px;
background: #a5c63b;
border-radius: 200px 200px 0 0;
position: absolute;
top: -170px;
}
.head:before, .head:after{
background: #a5c63b;
content: '';
width: 10px;
height: 53px;
position: absolute;
top: -30px;
border-radius: 20px 20px 0 0;
}
.head:before{
-webkit-transform: translate(255px, 0px) rotate(30deg);
-moz-transform:translate(255px, 0px) rotate(30deg);
-o-transform:translate(255px, 0px) rotate(30deg);
}
.head:after{
-webkit-transform: translate(63px, 0px) rotate(-30deg);
-moz-transform: translate(63px, 0px) rotate(-30deg);
-o-transform: translate(63px, 0px) rotate(-30deg);
}
/* eyes */
.eyes:before, .eyes:after{
background: #fff;
content: '';
width: 27px;
height: 27px;
top: 68px;
position: absolute;
border-radius: 20px;
}
.eyes:before{
left: 78px;
}
.eyes:after{
right: 78px;
}
/* body */
.body{
width: 336px;
height: 285px;
background: #a5c63b;
border-radius: 0px 0px 30px 30px;
position: absolute;
}
.body:before, .body:after{
background: #a5c63b;
content: '';
width: 75px;
height: 122px;
bottom: -122px;
position: absolute;
border-radius: 0 0 50px 50px;

}
.body:before{
left: 68px;
}
.body:after{
right: 68px;
}
/* arms */
.arms:before, .arms:after{
background: #a5c63b;
content: '';
width: 75px;
height: 233px;
top:-8px;
position: absolute;
border-radius: 40px;
}
.arms:before{
left: -90px;
}
.arms:after{
right: -90px;
}

</style>
<body>
<div class="android">
<div class="head">
<div class="eyes"></div>
</div>
<div class="body">
<div class="arms"></div>
</div>
</div>
</body>
</html></pre>


<pre></pre>
<pre></pre>
<p></p>
<pre></pre>
<pre></pre>
<p></p>
<p>

</p>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>

</pre>

更多精彩内容其他人还在看

CSS样式分离之再分离达到精简与重用

无论是CSS的分离还是js的分离,其主要作用之一就是精简与重用,CSS本身就代表着精简与重用,CSS样式分离,我一般指的是“以单独的CSS文件将CSS样式分离出来”,此处的重用多针对不同页面的重用,就是说,一个样式文件,可以多个页面使用,这对于一些公共样式的重构是很有
收藏 0 赞 0 分享

CSS属性behavior的语法使用说明

在进行CSS网页布局的时候,我们经遇到刷新要保留表单里内容的时候,习惯的做法使用cookie,但是那样做实在是很麻烦,css中的behavior就为我们很好的解决了这个问题。今天jb51.net就向大家介绍CSS属性behavior的语法
收藏 0 赞 0 分享

网页制作中的水平居中和垂直居中解决方法集合

 在定义网页的CSS样式的时候,我们或许并不怎么用到垂直居中。
收藏 0 赞 0 分享

最常见IE的Bug及其fix修复方法

Internet Explorer – Web程序员的毒药。在IE上开发时间中有超过60%的时间是花在和IE的bug进行搏斗,让你的开发生产率严重下降。下面是一个教程,告诉你9个IE上最常见的BUG以及如何解决它们。
收藏 0 赞 0 分享

CSS常用浏览器兼容调整小结

用CSS+DIV来写网站代码的好处显而易见,这里不多说了,但由于不同浏览器对CSS的解释不统一,造成不同浏览器下页面错位的现象十分常见……
收藏 0 赞 0 分享

css firefox火狐浏览器下的兼容性问题

css firefox火狐浏览器下的兼容性问题
收藏 0 赞 0 分享

DIV+CSS 浏览器兼容性小结

在网站设计的时候,应该注意css样式兼容不同浏览器问题,特别是对完全使用DIV CSS设计的网,就应该更注意IE6 IE7 FF对CSS样式的兼容,不然,你的网乱可能出去不想出现的效果!
收藏 0 赞 0 分享

div+css 布局常识 8问

CSSer与其他IT职位一样,在找工作的时候,都会面临着面试官提出的问题,或者给出的试卷。今天jb51.net收集了常见的8条面试题目,希望对您有所帮助。
收藏 0 赞 0 分享

CSS用四种方式实现布局

CSS用四种方式实现布局
收藏 0 赞 0 分享

css 解决表格边框不显示的问题

在 IE6 中,当表格单元格中的数据为空时,边框是不显示的,在IE8中是会显示的,怎样解决这个不兼容的问题呢。
收藏 0 赞 0 分享
查看更多