Lesson: HTML5 and CSS
Make Circular Images with a Border Radius
In addition to pixels, you can also specify a border-radius
using a percentage.
Give your cat photo a border-radius
of 50%
.
Your image should have a border radius of
50%
, making it perfectly circular. Be sure to use a percentage instead of a pixel value.
href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"
.red-text {
color: red;
}
h2 {
font-family: Lobster, Monospace;
}
p {
font-size: 16px;
font-family: Monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 10px;
}
.smaller-image {
width: 100px;
}
class="red-text"CatPhotoApp
class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. "
class="red-text"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the
grass sniff.
class="red-text"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
Correct, congratulations!
Next problem: Link to External Pages with Anchor Elements
Try again
The content on this page is licensed under Attribution-ShareAlike 4.0 International. Original authors: freeCodeCamp, the content was modified.