{"id":2527,"date":"2014-01-27T02:07:36","date_gmt":"2014-01-27T06:07:36","guid":{"rendered":"http:\/\/www.searchenginegenie.com\/web-design-blog\/?p=2527"},"modified":"2014-01-27T02:09:07","modified_gmt":"2014-01-27T06:09:07","slug":"role-of-media-query-in-css3-for-responsive","status":"publish","type":"post","link":"https:\/\/www.searchenginegenie.com\/web-design-blog\/role-of-media-query-in-css3-for-responsive\/","title":{"rendered":"Role of MEDIA QUERY in CSS3 for Responsive"},"content":{"rendered":"<p><span style=\"color: #0000ff;\"><strong>CSS media queries<\/strong>:<\/span><\/p>\n<p><span style=\"font-family: Arial;\">A media query consists of a media type and at least one expression that limits the style sheet&#8217;s scope by using media features, such as width, height, and color. Media queries added in CSS 3.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Syntax:<\/span><\/p>\n<p><span style=\"font-family: Arial;\">Media queries consist of a media type and can, as of the CSS3 specification, contain one or more expressions, expressed as media features, which resolve to either true or false.\u00a0 The result of the query is true if the media type specified in the media query matches the type of device the document is being displayed on and all expressions in the media query are true.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Media Types:<\/span><\/p>\n<p><span style=\"font-family: Arial;\">Some CSS properties are only designed for a certain media. For example the &#8220;voice-family&#8221; property is designed for aural user agents. Some other properties can be used for different media types. For example, the &#8220;font-size&#8221; property can be used for both screen and print media, but perhaps with different values.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Media Type:<\/span>Description<\/p>\n<p><span style=\"color: #0000ff;\">all<\/span>:Used for all media type devices.<br \/>\n<span style=\"color: #0000ff;\">aural<\/span>:Used for speech and sound synthesizers.<br \/>\n<span style=\"color: #0000ff;\">braille<\/span>:Used for braille tactile feedback devices.<br \/>\n<span style=\"color: #0000ff;\">embossed<\/span>:Used for paged braille printers.<br \/>\n<span style=\"color: #0000ff;\">handheld<\/span>:Used for small or handheld devices.<br \/>\n<span style=\"color: #0000ff;\">print<\/span>:Used for printers.<br \/>\n<span style=\"color: #0000ff;\">projection<\/span>:Used for projected presentations, like slides.<br \/>\n<span style=\"color: #0000ff;\">screen<\/span>:Used for computer screens.<br \/>\n<span style=\"color: #0000ff;\">tty<\/span>:Used for media using a fixed-pitch character grid, like teletypes and terminals.<br \/>\n<span style=\"color: #0000ff;\">tv<\/span>:Used for television-type devices<\/p>\n<p><span style=\"color: #0000ff;\">Eg<\/span>:<br \/>\n@media screen<br \/>\n{<br \/>\np.test {font-family:verdana,sans-serif;font-size:14px;}<br \/>\n}<br \/>\n@media print<br \/>\n{<br \/>\np.test {font-family:times,serif;font-size:10px;}<br \/>\n}<br \/>\n@media screen,print<br \/>\n{<br \/>\np.test {font-weight:bold;}<br \/>\n}<\/p>\n<p><span style=\"color: #0000ff;\">or<\/span><br \/>\n&lt;link href=&#8221;styles.css&#8221; type=&#8221;text\/css&#8221; media=&#8221;screen&#8221; rel=&#8221;stylesheet&#8221;\/&gt;<br \/>\n&lt;link href=&#8221;styles.css&#8221; type=&#8221;text\/css&#8221; media=&#8221;print&#8221; rel=&#8221;stylesheet&#8221;\/&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CSS media queries: A media query consists of a media type and at least one expression that limits the style sheet&#8217;s scope by using media features, such as width, height, and color. Media queries added in CSS 3. Syntax: Media queries consist of a media type and can, as of the CSS3 specification, contain one [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2527","post","type-post","status-publish","format-standard","hentry","category-whats-trending-web-design"],"_links":{"self":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts\/2527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/comments?post=2527"}],"version-history":[{"count":1,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts\/2527\/revisions"}],"predecessor-version":[{"id":2528,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts\/2527\/revisions\/2528"}],"wp:attachment":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/media?parent=2527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/categories?post=2527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/tags?post=2527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}