Media Queries Flashcards
What is a media query?
A CSS3 module, allowing content rendering to adapt to certain conditions eg screen size.
How do you add a media query in CSS
@media screen and (min-width xxxpx){
}
What properties can be added into a media query?
- Min/Max width
- Height
- Orientation
- Aspect Ratio
- Resolution
What characters do you use to combine media queries?
The use of a ‘,’ (comma) means OR
‘and’ means BOTH
Why is responsive design also good for developers?
Ability to code faster
What is a breakpoint and why do we create a breakpoint?
Breakpoints are a points where the website responds according to the device width.
Breakpoints are created by allowing your browser to tell you when your layout breaks.
Do background images change or are they fixed?
Background images do not change. Position of image controls here it is cropped.
How do you make flexible images?
Give the image a width and percentage. (width is related to parent size)
Give them a min/max-width (this related to image size)
Do background cover images change?
They do not change. It takes up the width at 100% but height can be cropped. Give a height to remove the crop.