This article will share with you a piece of Doraemon function implemented by html5 and css3. The code is simple and easy to understand and is very good. It has reference value. Friends who are interested can take a look.
The following piece of code is about html5 and The code for implementing Doraemon in css3. The specific code is as follows:
<!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"> <!-- 肚子 --> <p class="tummy"></p> <!-- 肚兜 --> <p class="bellyband"></p> <!-- 口袋 --> <p class="pocket"></p> <p class="cover"></p> </p> <!-- 左手 --> <p class="left_hand"> <!-- 手臂 --> <p class="Larm"></p> <!-- 手掌 --> <p class="Lpalm"></p> </p> <!-- 右手 --> <p class="right_hand"> <!-- 手臂 --> <p class="Rarm"></p> <!-- 手掌 --> <p class="Rpalm"></p> </p> <!-- 脚 --> <p class="foot"> <!-- 左脚 --> <p class="left_foot"></p> <!-- 右脚 --> <p class="right_foot"></p> <p class="crotch"></p> </p> </p> </p> </body> </html>
The above is the entire content of this article. I hope it will be helpful to everyone’s learning. For more related content, please pay attention to PHP Chinese net!
Related recommendations:
How to implement the pop-up creative search box layer with HTML5 and jQuery
HTML5, css3 and jquery implementation music player
The above is the detailed content of About the code of HTML5 and CSS3 to implement Doraemon. For more information, please follow other related articles on the PHP Chinese website!

html5的div元素默认一行不可以放两个。div是一个块级元素,一个元素会独占一行,两个div默认无法在同一行显示;但可以通过给div元素添加“display:inline;”样式,将其转为行内元素,就可以实现多个div在同一行显示了。

html5中列表和表格的区别:1、表格主要是用于显示数据的,而列表主要是用于给数据进行布局;2、表格是使用table标签配合tr、td、th等标签进行定义的,列表是利用li标签配合ol、ul等标签进行定义的。

固定方法:1、使用header标签定义文档头部内容,并添加“position:fixed;top:0;”样式让其固定不动;2、使用footer标签定义尾部内容,并添加“position: fixed;bottom: 0;”样式让其固定不动。

HTML5中画布标签是“<canvas>”。canvas标签用于图形的绘制,它只是一个矩形的图形容器,绘制图形必须通过脚本(通常是JavaScript)来完成;开发者可利用多种js方法来在canvas中绘制路径、盒、圆、字符以及添加图像等。

html5中不支持的标签有:1、acronym,用于定义首字母缩写,可用abbr替代;2、basefont,可利用css样式替代;3、applet,可用object替代;4、dir,定义目录列表,可用ul替代;5、big,定义大号文本等等。

html5废弃了dir列表标签。dir标签被用来定义目录列表,一般和li标签配合使用,在dir标签对中通过li标签来设置列表项,语法“<dir><li>列表项值</li>...</dir>”。HTML5已经不支持dir,可使用ul标签取代。

html5是指超文本标记语言(HTML)的第五次重大修改,即第5代HTML。HTML5是Web中核心语言HTML的规范,用户使用任何手段进行网页浏览时看到的内容原本都是HTML格式的,在浏览器中通过一些技术处理将其转换成为了可识别的信息。HTML5由不同的技术构成,其在互联网中得到了非常广泛的应用,提供更多增强网络应用的标准机。

3种取消方法:1、给td元素添加“border:none”无边框样式即可,语法“td{border:none}”。2、给td元素添加“border:0”样式,语法“td{border:0;}”,将td边框的宽度设置为0即可。3、给td元素添加“border:transparent”样式,语法“td{border:transparent;}”,将td边框的颜色设置为透明即可。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver Mac version
Visual web development tools
