2015-06-14 78 views
-1

需要一些帮助。我在bootstrap中创建了一个网页。我的问题是在IPHONE 4和IPHONE 5的媒体查询中,它们在肖像上都有320px。但是当我看到我的表单IPHONE 4和IPHONE 5没有相同的高度。这里是我在320px肖像媒体查询的代码。 IPHONE 5扩展高度与IPHONE 4相比如何设置IPHONE4和IPHONE 5的纵向高度为320px?IPHONE 4和IPHONE 5媒体查询引导

div#rightCol_form.container{ 
 
\t \t \t width:100%; 
 
\t \t \t height:140%; 
 
    \t }

回答

0

这些都是iphone的媒体查询:5:

/* iphone 5 Retina Display: for portrait */ 
@media screen and (device-aspect-ratio: 40/71) and (max-device-width: 640px) and (orientation:portrait) {} 

/* iPhone 5 Retina Display: for landscape*/ 
@media screen and (device-aspect-ratio: 40/71) and (max-device-width: 640px) and (orientation:landscape) {} 
/* iphone 4*/ 
@media screen and (device-aspect-ratio: 2/3) {} 

Media Queries helpful link - iphones

+0

感谢您的答复,我会试试这个,然后我会回来再次如果我会成功与这个媒体查询。顺便说一句,这个“设备 - 纵横比:40/71”的含义是什么? –

+0

http://stackoverflow.com/questions/5725838/difference-between-aspect-ratio-and-device-aspect-ratio-in-css-media-queries阅读更多。 –

+0

我试过你给出的代码,但仍然只读了@media屏幕(最大宽度:320像素){div#rightCol_form.container { \t \t \t \t width:100%; \t \t \t身高:140%; \t}} –