Fallback for old browsers

I’m creating a simple page in which words/phrases appear one at a time. That works fine, but what is my fallback for browsers that support opaque but not transitions?

I have a codepen here showing the rough idea.

1 Like

You could use modernizr to detect support for transitions or just pull out the transition detection part.

e.g.

<script>
(function () {    
	var b = document.body.style;
    if(b.MozTransition=='' || b.WebkitTransition=='' || b.OTransition=='' || b.transition=='') {
       document.documentElement.className += ' trans';
	}

})();
</script>

Then:

.trans .fadein{
	opacity:0;
}
2 Likes

Cool, thanks squire.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.