Quantcast
Channel: rapid-enlargement 2022
Viewing all articles
Browse latest Browse all 38

Tell CSS that JavaScript is available ASAP

$
0
0

When you’re styling parts of a web page that will look and work differently depending on whether JavaScript is available or not, it can be very useful to use JavaScript to change or add a class name to the html element.

By doing this you can create CSS rules that will only be applied when JS is available and vice versa. The trick is to make sure the class names are switched as early as possible during page load.

Read full post

Posted in , .

Copyright © Roger Johansson



Viewing all articles
Browse latest Browse all 38

Trending Articles