嗨,我正在使用多种平板设备,iPad,Galaxy Tab,Acer Iconia,LG 3D Pad等。CSS媒体查询仅针对iPad和iPad?
- 的iPad - 1024×768
- LG垫 - 1280 X 768
- 的Galaxy Tab - 1280 x 800的
我想要的目标仅限iPad使用CSS3媒体查询。由于LG和iPad的设备宽度相同768px - 我无法分离每个设备。
我曾尝试以下分离,但似乎并没有奏效:
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation : portrait) /* applied to lg also */
@media only screen and (min-resolution: 132dpi) and (max-device-width: 1024px) and (orientation : portrait) /* applies to lg also */
@media only screen and (device-aspect-ratio: 1024/768) and (orientation : portrait) /* does not work on iPad or LG */
我不知道-webkit-设备的像素比等-webkit *选项和它们的值iPad的目标。我不想为样式使用JavaScript,有什么想法?
设备纵横比iPad上的工作,但要使用正确的值是1024分之768 –