我一直在使用苹果的Xcode工具(iOS模拟器)编写iPad视图的代码。我无法瞄准iPad Retina设备上的景观视图。我一直在尝试以下媒体查询..。
@media only screen and (min-device-width : 768px) and (max-device-width
: 1024px) and (orientation : landscape) and ( -webkit-min-device-
pixel-ratio: 2){ //style goes here// }
@media only screen and (min-device-width : 1536px) and (max-device-width
: 2048px) and (orientation : landscape) and ( -webkit-min-device-
pixel-ratio: 2){ //style goes here// }我找不到任何其他方法来瞄准iPad Retina的景观景观。我甚至在CSS文件的不同部分尝试过这段代码,但仍然没有任何进展。。
发布于 2014-01-28 21:10:00
我刚刚意识到,当我在Wordpress仪表板中输入编辑器(查询不在那里)时,我的FTP程序没有正常工作,所以我直接在主题的CSS文件上手动写了它,并且它工作了.This FTP程序偷走了我的几个小时。但the query was right and the meta tag as well.
总之,对于在编写新的iPads Retina显示器(32位和64位)时遇到问题的人,它们应该在其标题中包括- meta :
<meta name="viewport" content="width=device-width, user-scalable=no">相应的查询(在本例中为景观视图)是:
@media only screen and (min-device-width : 768px) and (max-device-width
: 1024px) and (orientation : landscape) and ( -webkit-min-device-
pixel-ratio: 2){ //style goes here// }发布于 2014-01-28 15:30:48
第一个是正确的,我使用相同的媒体查询,并正在处理一个真正的设备。也许你忘了包括元视口了?
https://stackoverflow.com/questions/21406369
复制相似问题