简体   繁体   English

媒体查询最大宽度320px问题

[英]media queries max width 320px issue

I have a problem with media queries in a 320px width. 我对320像素宽度的媒体查询有疑问。 I tried the next codes to set the query but browsers don't recognise it, so it doesn't work correctly: 我尝试了以下代码来设置查询,但浏览器无法识别它,因此无法正常工作:

1- @media only screen and (min-width: 320px) { 1- @仅含媒体的屏幕和(最小宽度:320像素){

2- @media (min-width:320 px) and (max-width:480 px) 2- @media(最小宽度:320像素)和(最大宽度:480像素)

3- @media (max-width: 320px){ 3- @media(最大宽度:320像素){

None of them work for me. 他们都没有为我工作。 What am I doing wrong? 我究竟做错了什么?

THANKS A LOT! 非常感谢!

Try 尝试

@media only screen and (min-width:3.33%){
.yourClass{
    width : 20%;
  }
}

And its better that u use % instead of px 而且最好使用%而不是px

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 显示:块; 对@media没有影响(最大宽度:320像素) - display: block; has no effect on @media (max-width: 320px) 我的横幅图片未使用“@media (min-width: 320px) and (max-width:767px)”显示 - My banner picture is not displaying using “@media (min-width: 320px) and (max-width:767px)” 媒体查询320px及更少 - media query for 320px and less @media(320px)无法与我的列配合使用,以使其宽度为100% - @media (320px) not working with my columns to make them 100% width 320px 宽度设备上的左右神秘填充 - Mysterious padding left-right on 320px width device 为什么移动设备上此网页上的内容小于等于 320 像素宽度而不是 100% 宽度? - Why is the content on this webpage on a mobile device with smaller equal 320px width not 100% wide? twitter boostrap(响应):.span3在宽度介于320px和797px之间时采用.span6全宽行为 - twitter boostrap (responsive) : .span3 taking .span6 full width behaviour when width between 320px and 797px 绝对定位的子项应与其父项的大小相同,因为我在 320 像素和 767 像素屏幕宽度之间调整屏幕大小 - Absolute positioned child should be at the same size as its parent as im resizing the screen between 320px and 767px screen width 不需要的边框,宽约320px - Unwanted border around 320px wide div 列内的图像不适合 320 像素屏幕 - The image inside the columns doesnt fit in the 320px screen
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM