Above I talked about how HTML has built-in features that you can take advantage of without relying on "custom" solutions that require more code and processing on the browser's part to implement. Here I'll discuss some examples of how CSS can do the same thing for you.
Reuse images
Often you'll find pages that use similar images in multiple places. For example, a logo variation in different colors, or an arrow pointing in two directions. As unique assets even though they may be similar, each one needs to be downloaded separately.
Going back to the page I looked at above when searching for thailand mobile database movie tickets , we can see a slideshow with left and right arrows:
Similar to the logic used above, while these image files are small, they still require a round trip to fetch from the server.
However, the arrows are the same—they just point in opposite directions! We can easily use CSS’s transform function to make an image bidirectional:
Another example is when the same logo appears in different parts of a page with different styles; they often load multiple variations, which is unnecessary. CSS can recolor your logo for you in a number of ways:
Interaction
Navigational elements like menus and tabs are often implemented in JavaScript, but these can also be done in pure CSS.