How to Draw a Circle with Text in the Center
To create a circle with text in the middle using CSS, modify the code used to draw the circle:
.circle { width: 500px; height: 500px; line-height: 500px; border-radius: 50%; font-size: 50px; color: #fff; text-align: center; background: #000 }
<div class="circle">Hello I am A Circle</div>
This code will create a centered circle with the text "Hello I am A Circle" positioned in the middle.
The above is the detailed content of How to Center Text within a CSS-Drawn Circle?. For more information, please follow other related articles on the PHP Chinese website!