media-queries

Media Query to differentiate Google Pixel 1/2 vs Google Pixel XL vs Google Pixel 2 XL

╄→尐↘猪︶ㄣ 提交于 2019-12-24 05:43:13
问题 Im writing a cordova app and need to isolate these google phones to adjust styling given this: Im struggling to differentiate between any of the Google Pixel Phones. @media only screen and (min-width: 411px) and (max-width: 731px) { .myDiv{ background-color: blue; } } this triggers on all Pixels - both in emulators and physical devices @media only screen and (min-width: 411px) and (-webkit-device-pixel-ratio: 3) { .myDiv{ background-color: blue; } } this does not trigger at all with any pixel

How to target only tablet devices in a cordova Android app

久未见 提交于 2019-12-24 05:32:04
问题 I have a requirement for an Android App to be built with Cordova (a hybrid App) HTML5 and CSS, and this app needs to target all (only) tablet devices starting from 7" to the largest (I believe it's 10.1"). Could someone advice on a standard implementation on media queries setup for this requirement? I am confused with the resolution and the DPI concepts of Android, when building a hybrid app with above requirement. 回答1: Use this configuration in Manifest to allow only Tablet devices.

How to target only tablet devices in a cordova Android app

别来无恙 提交于 2019-12-24 05:31:01
问题 I have a requirement for an Android App to be built with Cordova (a hybrid App) HTML5 and CSS, and this app needs to target all (only) tablet devices starting from 7" to the largest (I believe it's 10.1"). Could someone advice on a standard implementation on media queries setup for this requirement? I am confused with the resolution and the DPI concepts of Android, when building a hybrid app with above requirement. 回答1: Use this configuration in Manifest to allow only Tablet devices.

Are LINKed stylesheets out of the specified media even loaded?

谁都会走 提交于 2019-12-24 05:03:43
问题 I want the stylesheets out of the defined device width defined in a LINK tag not to be even loaded if it doesn't apply. I could import it from the main stylesheet (for handheld devices) by placing the import line at the bottom, only if I knew that file would be imported AFTER the rest of the css has been parsed, including images. So what is the behavior of the link tag when media properties are specified? Are they not used BUT loaded anyway? Are they NOT loaded at all? (what I wish) Thanks.

Are LINKed stylesheets out of the specified media even loaded?

白昼怎懂夜的黑 提交于 2019-12-24 05:02:32
问题 I want the stylesheets out of the defined device width defined in a LINK tag not to be even loaded if it doesn't apply. I could import it from the main stylesheet (for handheld devices) by placing the import line at the bottom, only if I knew that file would be imported AFTER the rest of the css has been parsed, including images. So what is the behavior of the link tag when media properties are specified? Are they not used BUT loaded anyway? Are they NOT loaded at all? (what I wish) Thanks.

Are LINKed stylesheets out of the specified media even loaded?

本秂侑毒 提交于 2019-12-24 05:02:20
问题 I want the stylesheets out of the defined device width defined in a LINK tag not to be even loaded if it doesn't apply. I could import it from the main stylesheet (for handheld devices) by placing the import line at the bottom, only if I knew that file would be imported AFTER the rest of the css has been parsed, including images. So what is the behavior of the link tag when media properties are specified? Are they not used BUT loaded anyway? Are they NOT loaded at all? (what I wish) Thanks.

Media queries in em not affected by the base font size

ぃ、小莉子 提交于 2019-12-24 04:09:03
问题 I'm trying to understand why setting a different base font size doesn't affect the EM values for the media queries. They are acting as the default base font size is 16px, while the rest of the content reacts normally. Try it yourself: Media queries in PX: https://jsfiddle.net/sebtp/n8x0tuvq/5/ [OK] Media queries in EM: https://jsfiddle.net/sebtp/n8x0tuvq/7/ [NOT OK] Media queries in REM: https://jsfiddle.net/sebtp/n8x0tuvq/10/ [NOT OK] html { font-size: 62.5%; /*setting the base font size to

Media queries in em not affected by the base font size

余生颓废 提交于 2019-12-24 04:07:52
问题 I'm trying to understand why setting a different base font size doesn't affect the EM values for the media queries. They are acting as the default base font size is 16px, while the rest of the content reacts normally. Try it yourself: Media queries in PX: https://jsfiddle.net/sebtp/n8x0tuvq/5/ [OK] Media queries in EM: https://jsfiddle.net/sebtp/n8x0tuvq/7/ [NOT OK] Media queries in REM: https://jsfiddle.net/sebtp/n8x0tuvq/10/ [NOT OK] html { font-size: 62.5%; /*setting the base font size to

Toggle mobile view in Foundation using CSS class or JS

给你一囗甜甜゛ 提交于 2019-12-24 01:54:43
问题 I am trying to toggle the mobile view for foundation framework. I found the relevant section of css in the foundation.css file... @media only screen and (max-width: 767px) { body { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; width: 100%; min-width: 0; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } .row { width: auto; min-width: 0; margin-left: 0; margin-right: 0; } .column, .columns { width: auto !important; float: none; } ... more code here ... .push

media query for 320px and less

拈花ヽ惹草 提交于 2019-12-24 01:38:11
问题 I am writing a media query for a web-page and managed to write media queries for 480px and more. But when I write media query for 320px it doesn't work properly. I want to capture the portrait views of most of the mobiles( iphone4, iphone5,iphone3,asus galaxy 7,samsung galaxy sII, samsung galaxy s3 ) which is 320px. The webpage I created was working with landscape views in these devices but doesnt scale for portrait views. Can anybody please point out the error in the query. This is the media