HTML and CSS Reference
Next, create a style for the CSS element. Within this style, you set the width and
the height to 100px , and set the position to absolute , as you will be moving
the element to different positions on the page. You can also make the square
into a circle by setting the border-radius to 50px . You also explicitly set the top
and left positions to 0px , and the background-color to blue .
This will render something similar to the image shown in Figure 5-1.
Figure 5-1. Rendering of a CSS circle
Now you need to set the next state for the ball. This is as simple as creating a
new style with different properties.
As you can see, the new properties set the circle to be positioned in the middle
of the screen with a background-color of yellow . Add this CSS class to the test