Kas*_*dis 2 css media-queries responsive-design
我似乎无法让这两个查询一起工作.似乎我列出的在'max-width:1360'中显示的内容覆盖了我必须为990px显示的内容.990px的媒体查询不会覆盖1360px查询中定义的任何内容.我为页脚做了一个工作,但我认为这不是系统的设计方式.我做了一些研究,但我找不到任何能够解释为什么这不起作用的人:
@media screen and (max-width: 990px) {
#header {width: 990px; display: inherit;}
#header_info {width: 990px;}
#border_header {width:990px;}
#contact_data { display: none;}
#contact_data1 {width: 990px; display: inherit;}
#contact_data1 img {float: left; }
#contact_info {width: 990px;}
#wrapper {width: 990px; float: left; }
#container {width: 990px; float: left; }
#left_window {width: 200px; float: left; }
#left_window a {font-size:20px;}
#content {width: 687px; }
#right_window {display:none}
#footer {display:none;}
#footer_content {display:none;}
#footer_container {display:none;}
#footer_content_left {display:none;}
#footer_content_center {display:none;}
#footer_content_right {display:none;}
#footer1 {width: 990px; display:inherit;}
#footer_content1 {width: 990px; display:inherit;}
#footer_container1 {width: 990px; display:inherit;}
#footer_content_left1 {width: 150px; display:inherit;}
#footer_content_center1 {width: 150px; display:inherit;}
#footer_content_right1 {width: 150px; display:inherit;}
#product_listing {margin-left: 55px; }
#breakgarage {display: inherit;}
}
@media screen and (max-width: 1360px) {
#footer {width: 1360px;}
#footer_content {width: 1360px;}
#footer_container {width: 1360px;}
#footer_content_left {width:330px;}
#footer_content_center {width: 330px;}
#footer_content_right {width: 330px;}
#header {width: 100%;}
#header_info {width: 1360px;}
#border_header {width:1360px;}
#contact_data {width: 1360px;}
#contact_data img {float: left;}
.contact_data_space {padding-left: 75px;}
#contact_info {width: 1360px;}
#wrapper {width: 1360px;}
#container {width: 1360px;}
contact_info img {width: 50%}
}
Run Code Online (Sandbox Code Playgroud)
CSS正在级联.它从上到下解释.这就是你的1360px样式覆盖990px样式的原因.990px是一个子1360px匹配,但它有相同的priotity,所以它最后覆盖到最后覆盖.
撤消您的订单.如果你使用max-width,从最小的最大结尾开始从上到下写.