Qhmit
.com
Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
Run
<!DOCTYPE html> <title>My Example</title> <style> body { background: gray; } body::before { content: "Your screen is lower than 72dpi - time to upgrade!"; font-size: 2em; color: white; } @media screen and (min-resolution: 72dpi) { body { background: red; } body::before { content: "Your screen is between 72dpi and 150dpi"; } } @media screen and (min-resolution: 150dpi) { body { background: green; } body::before { content: "Your screen is between 150dpi and 300dpi"; } } @media screen and (min-resolution: 300dpi) { body { background: blue; } body::before { content: "Your screen is at least 300dpi"; } } </style>
Preview