?Describe media queries and give a simple code example of using them.
What will be an ideal response?
?In CSS3, media types have been expanded into media queries, which let you create more precise rules for destination media. A media query contains both a media type and optional expressions that check conditions called media features, which include characteristics such as the width or height of the destination device.With the addition of the following style rule, the browser will detect the maximum width of the screen. If it is 480 pixels or less, the header element will have a width of 90%.
@media screen and (max-width: 480px) {
header {width: 90%;}
}You can add multiple media features with the and keyword. @media screen and (min-width: 480px) and (max-width: 768px)
Any style rules that accompany this media query are applied when the width of the browser window falls between the stated minimum and maximum pixel values.
You might also like to view...
Given the following code, find the compile error.
``` public class Test { public static void main(String[] args) { m(new GraduateStudent()); m(new Student()); m(new Person()); m(new Object()); } public static void m(Student x) { System.out.println(x.toString()); } } class GraduateStudent extends Student { } class Student extends Person { @Override public String toString() { return "Student"; } } class Person extends Object { @Override public String toString() { return "Person"; } }``` a. m(new GraduateStudent()) causes an error b. m(new Student()) causes an error c. m(new Person()) causes an error d. m(new Object()) causes an error
The most popular background color is ____.
A. blue B. white C. red D. yellow
In regards to a user account, what does a white circle with a black arrow indicate?
A. The account is locked. B. The account is disabled. C. It is a guest account. D. It is corrupted and needs attention.
The goal in proper database design is to be able to qualify for third normal form, then second normal form, then first normal form, then zero normal form.
Answer the following statement true (T) or false (F)