• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com专业计算机教程网站
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • html/xhtml
  • html5
  • CSS
  • XML/XSLT
  • Dreamweaver教程
  • Frontpage教程
  • 心得技巧
  • bootstrap
  • vue
  • AngularJS
  • HBuilder教程
  • css3
  • 浏览器兼容
  • div/css
  • 网页编辑器
  • axure
您的位置:首页 > 网页设计 >html5 > 关于HTML5和CSS3实现机器猫的代码

关于HTML5和CSS3实现机器猫的代码

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2018-12-03

本文主要包含html5,css3,css3机器猫等相关知识,匿名希望在学习及工作中可以帮助到您
本文给大家分享一段html5和css3实现的机器猫功能,代码简单易懂非常不错,具有参考借鉴价值,感兴趣的朋友一起看看吧

下面一段代码是有关html5和css3实现机器猫的代码,具体代码如下所示:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>机器猫</title>
<style type="text/css">
* {   
margin: 0;   
padding: 0;   
}   
.whole {   
width: 800px;   
margin: 20px auto;   
/*border: 2px solid yellow;*/   
background-color: white;   
position: relative;   
}   
.head {   
margin: 0 auto;   
position: relative;   
width: 500px;   
height: 440px;   
background-color: #00b7e7;   
border-radius: 220px;   
border: 1px solid red;   
}   
.eye .left_eye,   
.eye .right_eye {   
width: 100px;   
height: 130px;   
background-color: white;   
border: 2px solid black;   
border-radius: 50px;   
position: absolute;   
top: 50px;   
z-index: 3;   
}   
.eye .LeyeBall,   
.eye .ReyeBall {   
width: 20px;   
height: 20px;   
background: black;   
border-radius: 10px;   
position: absolute;   
top: 65px;   
}   
.eye .left_eye {   
left: 146px;   
}   
.eye .right_eye {   
left: 250px;   
}   
.eye .LeyeBall {   
right: 10px;   
}   
.eye .ReyeBall {   
left: 10px;   
}   
.face {   
position: relative;   
z-index: 2;   
}   
.face .feature {   
width: 400px;   
height: 320px;   
border-radius: 160px;   
position: absolute;   
top: 100px;   
left: 50px;   
background: white;   
}   
.face .nose {   
width: 45px;   
height: 50px;   
border-radius: 23px;   
background-color: #cf3318;   
border: 2px solid black;   
position: absolute;   
top: 165px;   
left: 225px;   
z-index: 3;   
}   
.face .Nline {   
width: 3px;   
height: 160px;   
background: black;   
position: absolute;   
top: 218px;   
left: 248px;   
z-index: 3;   
}   
.face .mouth {   
width: 280px;   
height: 280px;   
border-bottom: 5px solid black;   
border-radius: 140px;   
position: absolute;   
top: 98px;   
left: 105px;   
}   
.face .mustache .MutR_higher {   
width: 80px;   
height: 2px;   
background: black;   
position: absolute;   
top: 220px;   
left: 295px;   
z-index: 2;   
}   
.face .mustache .MutR_middle {   
width: 80px;   
height: 2px;   
background: black;   
position: absolute;   
top: 240px;   
left: 295px;   
z-index: 2;   
}   
.face .mustache .MutR_lower {   
width: 80px;   
height: 2px;   
background: black;   
position: absolute;   
top: 260px;   
left: 295px;   
z-index: 2;   
}   
.face .mustache .MutL_top {   
width: 80px;   
height: 2px;   
background: black;   
position: absolute;   
top: 220px;   
left: 115px;   
z-index: 2;   
}   
.face .mustache .MutL_center {   
width: 80px;   
height: 2px;   
background: black;   
position: absolute;   
top: 240px;   
left: 115px;   
z-index: 2;   
}   
.face .mustache .MutL_bottom {   
width: 80px;   
height: 2px;   
background: black;   
position: absolute;   
top: 260px;   
left: 115px;   
z-index: 2;   
}   
.face .mustache .MutL_bottom,   
.face .mustache .MutR_higher {   
transform: rotate(160deg);   
}   
.face .mustache .MutL_top,   
.face .mustache .MutR_lower {   
transform: rotate(200deg);   
}   
.neck {   
width: 300px;   
height: 30px;   
background-color: #a31f12;   
border: 2px solid black;   
border-radius: 15px;   
position: relative;   
top: 0px;   
left: 250px;   
z-index: 4;   
}   
.neck .bell {   
width: 60px;   
height: 60px;   
overflow: hidden;   
border: 2px solid black;   
border-radius: 60px;   
background-color: #cfcb3c;   
position: absolute;   
top: 5px;   
left: 120px;   
}   
.bell .Bline {   
width: 60px;   
height: 2px;   
background-color: #cfcb3c;   
border: 2px solid black;   
border-radius: 3px 3px 0 0;   
position: absolute;   
top: 15px;   
}   
.bell .Bcircle {   
width: 20px;   
height: 16px;   
background: black;   
border-radius: 8px;   
position: absolute;   
top: 25px;   
left: 20px;   
}   
.bell .Bunderpart {   
width: 3px;   
height: 20px;   
background-color: black;   
position: absolute;   
left: 28px;   
top: 40px;   
}   
.body {   
position: relative;   
top: -300px;   
z-index: 1;   
}   
.body .tummy {   
width: 280px;   
height: 240px;   
background-color: #00b1e1;   
border: 2px solid black;   
position: absolute;   
top: 267px;   
left: 260px;   
}   
.body .bellyband {   
width: 220px;   
height: 220px;   
background-color: white;   
border: 2px solid black;   
border-radius: 110px;   
position: absolute;   
left: 290px;   
top: 267px;   
}   
.body .pocket {   
width: 160px;   
height: 160px;   
border-radius: 80px;   
background-color: white;   
border: 2px solid black;   
position: absolute;   
top: 305px;   
left: 320px;   
}   
.cover {   
width: 164px;   
height: 80px;   
background-color: white;   
border-bottom: 2px solid black;   
/*border: 5px solid orange;*/   
position: absolute;   
top: 300px;   
left: 320px;   
}   
.left_hand,   
.right_hand {   
height: 100px;   
width: 100px;   
position: absolute;   
top: 272px;   
left: 248px;   
}   
.left_hand {   
left: -10px;   
}   
.left_hand .Larm {   
width: 70px;   
height: 100px;   
background-color: #00bee8;   
border: 1px solid black;   
position: relative;   
top: 200px;   
left: 535px;   
transform: rotateZ(135deg);   
/*z-index: -1;*/   
}   
.right_hand {   
left: -10px;   
}   
.right_hand .Rarm {   
width: 70px;   
height: 100px;   
background-color: #00bee8;   
border: 1px solid black;   
/*z-index: -1;*/   
position: relative;   
top: 200px;   
left: 215px;   
transform: rotateZ(45deg);   
}   
.left_hand .Lpalm,   
.right_hand .Rpalm {   
width: 80px;   
height: 80px;   
border-radius: 40px;   
border: 2px solid black;   
background-color: white;   
position: absolute;   
}   
.right_hand .Rpalm {   
left: 580px;   
top: 260px;   
z-index: 1;   
}   
.left_hand .Lpalm {   
left: 160px;   
top: 260px;   
z-index: 1;   
}   
.foot .left_foot,   
.foot .right_foot {   
width: 150px;   
height: 40px;   
background-color: white;   
border: 2px solid black;   
border-radius: 80px 60px 60px 40px;   
position: relative;   
}   
.foot .left_foot {   
left: 240px;   
top: 210px;   
}   
.foot .right_foot {   
top: 165px;   
left: 410px;   
}   
.foot .crotch {   
width: 40px;   
height: 20px;   
background-color: white;   
border: 2px solid black;   
border-bottom: none;   
border-radius: 40px 40px 0 0;   
position: relative;   
top: 103px;   
left: 382px;   
z-index: 2   
}   
</style>
</head>
<body>
<p class="wrap">
<p class="whole">
<!-- 头 -->
<p class="head">
<!-- 眼 -->
<p class="eye">
<!-- 左眼 -->
<p class="left_eye">
<!-- 左眼球 -->
<p class="LeyeBall"></p>
</p>
<!-- 右眼 -->
<p class="right_eye">
<!-- 右眼球 -->
<p class="ReyeBall"></p>
</p>
</p>
<!-- 脸 -->
<p class="face">
<!-- 脸型 -->
<p class="feature"></p>
<!-- 鼻 -->
<p class="nose"></p>
<!-- 鼻子线 -->
<p class="Nline"></p>
<!-- 嘴 -->
<p class="mouth"></p>
<!-- 胡子 -->
<p class="mustache">
<p class="MutL_top"></p>
<p class="MutL_center"></p>
<p class="MutL_bottom"></p>
<p class="MutR_higher"></p>
<p class="MutR_middle"></p>
<p class="MutR_lower"></p>
</p>
</p>
</p>
<!-- 脖子 -->
<p class="neck">
<!-- 铃铛 -->
<p class="bell">
<p class="Bline"></p>
<p class="Bcircle"></p>
<p class="Bunderpart"></p>
</p>
</p>
<!-- 身体 -->
<p class="body">
<
  


 

您可能想查找下面的文章:

  • HTML5知识点总结
  • HTML5的本地存储
  • HTML5本地存储之IndexedDB
  • Html5实现文件异步上传功能
  • Html5新标签datalist实现输入框与后台数据库数据的动态匹配
  • 详解HTML5 window.postMessage与跨域
  • HTML5拖放API实现拖放排序的实例代码
  • 解决html5中video标签无法播放mp4问题的办法
  • HTML5新特性 多线程(Worker SharedWorker)
  • Html5新增标签有哪些

相关文章

  • 2018-12-03鼠标移出事件的案例以及详解
  • 2018-12-03现阶段用 HTML5 重构网站,力度怎样合适?
  • 2017-08-06HTML5 Canvas实现玫瑰曲线和心形图案的代码实例
  • 2018-12-03canvas的绘图api使用详解
  • 2018-12-03css书写顺序需要注意哪些?
  • 2018-12-03百行 HTML5 代码实现四种双人对弈游戏
  • 2018-12-03html5中新特性之语义化标签的实例分析
  • 2018-12-03H5编辑器核心思想的实例分析
  • 2018-12-03Html5的Reset和Base样式结合的示例代码
  • 2018-12-03实例讲解使用SVG制作loading加载动画的方法_html5教程技巧

文章分类

  • html/xhtml
  • html5
  • CSS
  • XML/XSLT
  • Dreamweaver教程
  • Frontpage教程
  • 心得技巧
  • bootstrap
  • vue
  • AngularJS
  • HBuilder教程
  • css3
  • 浏览器兼容
  • div/css
  • 网页编辑器
  • axure

最近更新的内容

    • HTML5每日一练之Canvas标签的应用-绘制矩形
    • 請用過的朋友講一講,Adobe Edge Animate,Reflow,Code,Inspect和Fonts有什麼區別和聯繫?相比FW有哪些進步?
    • 使用html5 canvas 画时钟代码实例分享
    • 前端框架-弹窗的研究
    • 为什么HTML5移除了big标签却新增了small标签?
    • 10款HTML5编码简化工具
    • 极客学院HTML5新特性基础视频课件源码
    • HTML5制作酷炫音频播放器插件图文教程
    • HTML5实践-使用css装饰图片画廊的代码分享(二)
    • html5返回当前音频/视频的长度以秒计的属性duration

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有