Lazy loading images

Browers now support the loading= attribute which allows you to specify if images should be lazy loaded: Options: “auto”Default lazy-loading behavior of the browser (same as not including the attribute). “lazy”Defer loading of the resource until it reaches a calculated distance from the viewport. “eager”Load the resource immediately, regardless of where it’s located on the […]

Read More

Image Size

Image To Fill Space Resizing but keep aspect ratio This also works well: Responsive – Set max width but image shrinks if necessary

Read More

.Images General

Specifying Image Size (e.g. using double resolution images for retina displays) .header_logo {background-image: url(images/header_logo.png);background-size: 260px 55px;width: 260px;height: 55px;border: none;} Adding an image (e.g. an icon) to the left of some text Cropping overflow: hidden; Curved Corners border-radius: 4px 4px 4px 4px; Specifying Image Class <a href=”school_home.php”><img class=”my_thumb_class” src=”a.png” ></a> img.my_thumb_class { Floating An Image Over […]

Read More