At first, you need to write the appropriate HTML markup. Refer to the examples below:
INPUT HTML <div id="content"> <h1>CSS circles using border radius</h1> <div class="circle blue">Blue</div> <div class="circle green">Green</div> <div class="circle red">Red</div> <p class="feedback">Feedback welcome<a href="#">@htmlwhiz</a></p> </div>
Now, you need to write the CSS script to assign properties. Refer to the examples below: CSS body { font-family: "open sans", sans-serif; background: #f1f1f1; } #content { margin: 40px auto; text-align: center; width: 600px; } #content h1 { text-transform: uppercase; font-weight: 700; margin: 0 0 40px 0; font-size: 25px; line-height: 30px; } .circle { width: 200px; height: 200px; line-height: 200px; border-radius: 50%; -moz-border-radius: 50%; -webkit-border-radius: 50%; text-align: center; color: white; font-size: 16px; text-transform: uppercase; font-weight: 700; margin: 0 auto 40px; } .blue { background-color: #3498db; } .green { background-color: #16a085; } .red { background-color: #e74c3c; } .feedback { font-size: 14px; color: #b1b1b1; }
OUTPUT [blockquote align="none" author="devrant.com"] Developers saying programming is pure logic have never done CSS in their life.[/blockquote]
INPUT HTML <div id="content"> <h1>CSS circles using border radius</h1> <div class="circle blue">Blue</div> <div class="circle green">Green</div> <div class="circle red">Red</div> <p class="feedback">Feedback welcome<a href="#">@htmlwhiz</a></p> </div>
Now, you need to write the CSS script to assign properties. Refer to the examples below: CSS body { font-family: "open sans", sans-serif; background: #f1f1f1; } #content { margin: 40px auto; text-align: center; width: 600px; } #content h1 { text-transform: uppercase; font-weight: 700; margin: 0 0 40px 0; font-size: 25px; line-height: 30px; } .circle { width: 200px; height: 200px; line-height: 200px; border-radius: 50%; -moz-border-radius: 50%; -webkit-border-radius: 50%; text-align: center; color: white; font-size: 16px; text-transform: uppercase; font-weight: 700; margin: 0 auto 40px; } .blue { background-color: #3498db; } .green { background-color: #16a085; } .red { background-color: #e74c3c; } .feedback { font-size: 14px; color: #b1b1b1; }
OUTPUT [blockquote align="none" author="devrant.com"] Developers saying programming is pure logic have never done CSS in their life.[/blockquote]
Comments
Post a Comment