<div class="container">
  <p>If the output device you're using to view this demo has a resolution greater than 300dpi (and using a modern browser that supports media queries), then you should see this text in white on a black background.</p>
</div>
body {
  background-color: #F5F5F5;
  color: #555;
  font-size: 1.1em;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.container {
  margin: 40px auto;
  max-width: 700px;
}

@media screen and (min-resolution: 300dpi) {
  body {
    background-color: black;
    color: white;
  }
}