您现在的位置是:网站首页> 编程资料编程资料
HTML5+CSS3实现机器猫纯css3绘制的哆啦a梦机器猫头像效果源码
2021-08-31
962人已围观
简介 本文给大家分享一段html5和css3实现的机器猫功能,代码简单易懂非常不错,具有参考借鉴价值,感兴趣的朋友一起看看吧
下面一段代码是有关html5和css3实现机器猫的代码,具体代码如下所示:
XML/HTML Code复制内容到剪贴板
- >
- <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
相关内容
- html5将图片转换成base64的实例代码HTML table 直列化格式详解HTML Form表单元素全面了解浅谈HTML空链接的作用HTML标签marquee实现滚动效果的简单方法(必看)使用Html5实现异步上传文件,支持跨域,带有上传进度条浅谈html标题,段落,换行,水平线,特殊字符浅谈html有序列表、无序列表与定义列表HTML5 Web 存储详解浅谈Html网页表格结构化标记的应用
- CSS3 画基本图形,圆形、椭圆形、三角形等纯CSS3+DIV实现小三角形边框效果的示例代码详解css如何利用 :before :after 写小三角形用CSS3绘制三角形的简单方法布局和排版教程 纯css3实现图片三角形排列使用css创建三角形 使用CSS3创建3d四面体原理及代码(html5实践)CSS3实现三角形不断放大效果
- html5本地存储 localStorage操作使用详解HTML5离线应用与客户端存储的实现HTML5本地存储和本地数据库实例详解详解前端HTML5几种存储方式的总结 HTML5 Web 存储详解HTML5中的网络存储实现方式
- a标签下载链接的简单实现元素绝对定位以后设置了高宽,a标签不能点击的原因及解决方法深入浅出meta标签 html meta标签的使用总结(推荐)HTML的meta标签常见用法集锦HTML的a标签href属性指定相对路径与绝对路径的用法讲解移动端html5 meta标签的神奇功效实例讲解HTML5的meta标签的一些应用 a标签有小手状和无小手状css的属性介绍
- HTML5新增加的功能详解浅谈HTML5 FileReader分布读取文件以及其方法简介HTML与XHTML、以及HTML4与HTML5标签之间的区别简介HTML5的一个显示电池状态的API简介HTML5是什么 HTML5是什么意思 HTML5简介HTML5安全介绍之内容安全策略(CSP)简介HTML5的标签的代码的简单介绍 HTML5标签的简介html5新增的定时器requestAnimationFrame实现进度条功能iPhone5和iOS6上HTML5开发的新增功能html5简介及新增功能介绍
- HTML5新增加标签和功能概述浅谈html5标签css3的常用样式html5中的一些标签学习(心得)浅谈Html5中视频 音频标签 进度条的问题HTML5进阶段内联标签汇总(小篇)关于HTML5语义标签的实践(blog页面)html5基于canvas实现的文字标签云3D旋转动画特效源码HTML5之语义标签介绍HTML5不支持标签和新增标签详解浅析HTML5中header标签的用法常用的HTML5列表标签
- H5 meta小结(前端必看篇)HTML5各种头部meta标签的功能(推荐)
- 浅谈h5自定义audio(问题及解决)H5 meta小结(前端必看篇)H5自适应企业网站源码 asp版 v1.0.110个H5页面制作工具 H5工具功能全面评测 织梦H5响应式门户网站源码 php版 v2.0h5调用摄像头的实现方法微页h5制作工具怎么快速导入PSD源文件?百度H5是什么? 百度H5基本使用技巧h5输入框提示语 + 正常文本框提示语的实现方法
- 巧用HTML5给按钮背景设计不同的动画简单实例html5 canvas实现的流星雨星星动画背景特效源码html5实现的创意扭曲针时钟特效源码HTML5 Canvas逼真黑板写字特效源码HTML5 Canvas支持移动端的刮刮卡特效HTML5实现微信朋友圈图片放大手机相册特效代码基于Html5+Canvas实现2016年七夕情人节倒计时特效源码HTML5实现响应式多角度全屏滑动切换特效源码H5 meta小结(前端必看篇)
- Html5元素及基本语法详解HTML5跨浏览器纯CSS工具提示特效源码HTML5实现响应式多角度全屏滑动切换特效源码HTML5中判断横屏竖屏的方法(移动端)html5实现的网格图片鼠标拖动拼图游戏源码HTML5 Web 存储详解HTML5新增加的功能详解HTML5新增加标签和功能概述使用Html5实现异步上传文件,支持跨域,带有上传进度条
点击排行
本栏推荐
