Responsive Web Degisn Flashcards
What is a media query?
A technique that changes the presentation of content based on different viewport sizes
What is a viewport?
The user’s visible area of a webpage, it is different depending on the device used to access the site
How do you use a media query?
@media (max-width: (number)px) { /* CSS Rules */ }
How do you make sure an image is never wider than it’s container?
max-width: 100%;
height: auto;
What are the four viewport units?
vw (viewport width): 10vw would be 10% of the viewport’s width.
vh (viewport height): 3vh would be 3% of the viewport’s height.
vmin (viewport minimum): 70vmin would be 70% of the viewport’s smaller dimension (height or width).
vmax (viewport maximum): 100vmax would be 100% of the viewport’s bigger dimension (height or width).