簡體   English   中英

自適應CSS不起作用

[英]Responsive CSS doesn't work

堆棧溢出的大家好,我有問題。 我的低分辨率響應式CSS無法正常工作,這是一個示例。

@media (min-width: 320px) and (max-width: 580px) {
.post_wrap_bg {
width: 460px;

height: 460px;
}
}
@media (min-width: 10px) and (max-width: 320px) {
.post_wrap_bg {
width: 360px;
height: 360px;
}
}

> 320不起作用,我可能做錯了什么?

您有錯字:

widht: 460px;

應該

width: 460px;

修復它,它將按預期工作。

你應該這樣嘗試

@media (min-width: 321px) and (max-width: 580px) {
  .post_wrap_bg {
    width: 460px;
    height: 460px;
  }
}

@media (min-width: 10px) and (max-width: 320px) {
  .post_wrap_bg {
    width: 360px;
    height: 360px;
  }
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM