Book Image

Mastering CSS

By : Rich Finelli
Book Image

Mastering CSS

By: Rich Finelli

Overview of this book

Rich Finelli trains you in CSS deep learning and shows you the techniques you need to work in the world of responsive, feature-rich web applications. Based on his bestselling Mastering CSS training video, you can now learn with Rich in this book! Rich shares with you his skills in creating advanced layouts, and the critical CSS insights you need for responsive web designs, fonts, transitions, animations, and using flexbox. Rich begins your CSS training with a review of CSS best practices, such as using a good text editor to automate your authoring and setting up a CSS baseline. You then move on to create a responsive layout making use of floats and stylable drop-down menus, with Rich guiding you toward a modular-organized approach to CSS. Your training with Rich Finelli then dives into detail about working with CSS and the best solutions to make your websites work. You'll go with him into CSS3 properties, transforms, transitions, and animations. You’ll gain his understanding of responsive web designs, web fonts, icon fonts, and the techniques used to support retina devices. Rich expands your knowledge of CSS so you can master one of the most valuable tools in modern web design.
Table of Contents (12 chapters)

Source set attribute (srcset)

SVG is still the most preferred way to serve retina images to HiDPI devices because the file size is nearly always smaller than JPG and PNG, and you only need one image for both retina and non- retina devices. But there is another, very good option that's emerged, called srcset. This option isn't meant to replace SVG, but rather complement it, since SVG can't be used for traditional raster images and photos, which are more suited for JPEG and PNG.

What is srcset?

The srcset attribute is simply just a set of images, just like the name implies. What we can do is provide not just one image for the browser to serve, but a set of images that the browser can choose from and only fetch...