MDN self-hosted library · e01.org

Media query fundamentals

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

css
@media media-type and (media-feature-rule) {
  /* CSS rules go here */
}
css
@media print {
  body {
    font-size: 12pt;
  }
}