Images
Styling photos using CSS is the same as styling any other element with the Box Model of padding, borders, and margins. Though using a lot of images is not encouraged, it is still necessary to use nice images when they are needed. CSS is useful for controlling image presentation.
CSS Images properties:
- Images for thumbnails : Thumbnail pictures are created using the border attribute.
- The border-radius attribute : It is used to set the radius of the border picture. One, two, three, or four values can be stored in this attribute. Border-top-left-radius, border-top-right-radius, border-bottom-left-radius, and border-bottom-right-radius are the four characteristics that make it up.
- Responsive Images : A responsive image is one that automatically adjusts to the size of the box it is placed in.
- Translucent Image : To make an image transparent, utilise the opacity property. Between 0.0 and 1.0 is the opacity value.
- Center the image : The left-margin and right-margin properties can be used to centre pictures within a box.
Images can be styled in multiple ways
Example No.1:
Knowledge2life
Use the border-radius property to create rounded images:
OUTPUT:
Knowledge2life
Use the border-radius property to create rounded images:
Example No.2:
Knowledge2life
OUTPUT:
Knowledge2life