Warehouse address: github.com/haiyoucuv/W…
Introduced concepts: display objects
The display object is the basic object rendered by the game client and can be understood as a div
Insert a div in the body
<div id="bird"></div>
Copy the code
Put divs in the position you like and add the color you like
#bird {
/ * * / size
width: 100px;
height: 100px;
/ * * / color
background-color: #f00;
/ * * / position
position: absolute;
top: 50%;
left: 50%;
/* Rotate, scale, etc. */
transform: scale(1.1) rotate(45deg);
/ * anchor * /
transform-origin: center;
}
Copy the code
After a meal of operation, we got a Bird we like, as shown in the picture below