Ways to avoid images

Sometimes, you can replace images with html and CSS. This section shows two examples of this—rounded corners and utility symbols.

Rounded corners in CSS

Consider the box in the following figure. You could implement the rounded corners with one or more images. However, this means that the browser has to request those images. And if you change the color of the page or the box, you may need to redo the images.

Rounded corners in CSS

Many browsers already support rounded corners natively. Firefox has the CSS property moz-border-radius (https://developer.mozilla.org/en/css/-moz-border-radius), while Google Chrome supports border-radius, a property introduced ...

Get ASP.NET Site Performance Secrets now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.