The content of this article is about using CSS to draw a bird. The content is very detailed. Friends in need can refer to it. I hope it can help you.
It’s not difficult either. Just write out the body parts step by step and then position them. Here is a rendering, and I added animation to the two later, which is a little ugly. I will slowly modify it later
##
<!DOCTYPE html> <html> <head> <title></title> </head> <style type="text/css"> body{ font-size: 0; text-align: center; } .wrap{ position: relative; width: 500px; margin: 0 auto; } .a{ display: inline-block; margin-top: 30px; width: 250px; height: 240px; background-color:#f2b22e; border: 1px solid #f2b22e; border-radius: 60% 60% 70% 70%; } .b{ display: inline-block; width: 0; height: 0; border-bottom:40px solid #f2b22e; border-right: 60px solid transparent; border-left: 12px solid transparent; transform: rotate(40deg); position: absolute; top: 26px; right: 115px; } .c{ display: inline-block; width: 0; height: 0; border-top:60px solid #f2b22e; border-right: 60px solid transparent; border-left: 12px solid transparent; transform: rotate(140deg); position: absolute; top: 26px; left: 105px; } .d{ width: 100px; height: 40px; border-radius: 50%; border:1px solid #f2b22e; background-color: #f2b22e; transform: rotate(0deg); position: absolute; top: 150px; right: 72px; animation: bird_right 0.5s linear infinite; } .e{ width: 100px; height: 40px; border-radius: 50%; border:1px solid #f2b22e; background-color: #f2b22e; transform: rotate(0deg); position: absolute; top: 150px; left: 72px; animation: bird_left 0.5s linear infinite; } .f{ width: 40px; height: 40px; border: 20px solid #fff; border-radius: 50%; background-color: #000; position: absolute; top: 80px; left: 155px; } .g{ width: 40px; height: 40px; border: 20px solid #fff; border-radius: 50%; background-color: #000; position: absolute; top: 80px; right: 155px; } .h{ width: 0; height: 0; border-top:20px solid #e27326; border-left:20px solid transparent; border-right:20px solid transparent; position: absolute; top: 147px; left: 230px; } .i{ width: 160px; height: 100px; border:1px solid #f3cc74; background-color: #f3cc74; border-radius: 50%; position: absolute; bottom: 0px; left: 170px; } .j{ width: 12px; border-bottom:20px solid #e27326; border-radius: 50%; position: absolute; } .j_{ bottom: 14px; left: 163px; } .k{ left: 155px; bottom: 18px; } .l{ left: 170px; bottom: 10px; } .n{ bottom: 10px; right: 163px; } .m{ bottom: 18px; right: 155px; } .o{ bottom: 5px; right: 170px; } @-webkit-keyframes bird_left{ 0% {transform:rotate(0deg)} 10% {transform:rotate(-10deg)} 20% {transform:rotate(-20deg)} 40% {transform:rotate(-30deg)} 60% {transform:rotate(-40deg)} 80% {transform:rotate(-50deg)} 100% {transform:rotate(-60deg)} } @-webkit-keyframes bird_right{ 0% {transform:rotate(0deg)} 10% {transform:rotate(10deg)} 20% {transform:rotate(20deg)} 40% {transform:rotate(30deg)} 60% {transform:rotate(40deg)} 80% {transform:rotate(50deg)} 100% {transform:rotate(60deg)} } @-moz-keyframes bird_right{ 0% {transform:rotate(0deg)} 10% {transform:rotate(10deg)} 20% {transform:rotate(20deg)} 40% {transform:rotate(30deg)} 60% {transform:rotate(40deg)} 80% {transform:rotate(50deg)} 100% {transform:rotate(60deg)} } @-moz-keyframes bird_left{ 0% {transform:rotate(0deg)} 10% {transform:rotate(-10deg)} 20% {transform:rotate(-20deg)} 40% {transform:rotate(-30deg)} 60% {transform:rotate(-40deg)} 80% {transform:rotate(-50deg)} 100% {transform:rotate(-60deg)} } @-o-keyframes bird_left{ 0% {transform:rotate(0deg)} 10% {transform:rotate(-10deg)} 20% {transform:rotate(-20deg)} 40% {transform:rotate(-30deg)} 60% {transform:rotate(-40deg)} 80% {transform:rotate(-50deg)} 100% {transform:rotate(-60deg)} } @-o-keyframes bird_right{ 0% {transform:rotate(0deg)} 10% {transform:rotate(10deg)} 20% {transform:rotate(20deg)} 40% {transform:rotate(30deg)} 60% {transform:rotate(40deg)} 80% {transform:rotate(50deg)} 100% {transform:rotate(60deg)} } </style> <body> <p class="wrap"> <p class="a"></p> <p class="b"></p> <p class="c"></p> <p class="d"></p> <p class="e"></p> <p class="f"></p> <p class="g"></p> <p class="h"></p> <p class="i"></p> <p class="j j_"></p> <p class="j k"></p> <p class="j l"></p> <p class="j n"></p> <p class="j m"></p> <p class="j o"></p> </p> </body> </html>Related recommendations:
How to use pure CSS to achieve the effect of a cartoon parrot
How to use pure CSS to achieve the effect of a coffee machine
The above is the detailed content of How to draw a bird using css (code). For more information, please follow other related articles on the PHP Chinese website!

CSS is what gives every website its design. Websites sure aren’t very fun and friendly without it! I’ve read about somebody going a week without JavaScript

My partner and I ran a design and development conference company for eight years. During that time, we produced hundreds of hours of conferences, both on-site

Jacob Schatz (@jakecodes) is a staff engineer over at GitLab and was kind enough to share how he conducts job interviews for technical positions and his

You can have multiple classes on an HTML element:

Events are used to respond when a user clicks somewhere, focuses on a link with their keyboard, and changes the text in a form. When I first started learning

Let's say you're rocking a JAMstack-style site (no server-side languages in use), but you want to do something rather dynamic like send an email. Not a

Specific design systems, I mean. Design systems, as a concept, are something just about any site can benefit from.

I've said before one quick and powerful thing you can learn as a front-end developer just getting starting with JavaScript is changing classes.


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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft