CSS-Tricks Example

Conditional Content based on CSS Media Queries

The content below (loaded via Ajax) is conditional based on the screen width. The media queries are maintained only in the CSS.

For the sake of demo, window resizing to certain breakpoints will trigger the conditions again and load new content as appropriate.

Baby Bear

His porridge was just right.