【发布时间】:2014-05-22 18:38:42
【问题描述】:
原始 CSS
.form-head {margin: 0 auto; max-width: 66.5em; padding-bottom: 5.2em; }
.footleft{ max-width: 47.0%;float:left; margin-left: 2.8em; }
.footright{max-width: 46.9%; float:right; padding-bottom: 2%;}
媒体查询
@media screen and(max-width: 768px) {
.form-head { margin: 0 auto !important; max-width: 56.5em !important ; }
.gradiant{min-width: 50% !important;}
.post-contents { max-width: 64.4%; }
.footleft{float:none; max-width:79%; margin:0 auto;}
.footright{float:none; max-width:83%; margin:0 auto;}
.footercontainer {margin: 0 auto; width:94%;}
}
媒体查询样式不会覆盖原始 css 。当我添加 !important 时,它正在工作,但我想获得媒体查询样式,不包括 !important。
【问题讨论】:
-
您有该网站的链接吗?
-
不,我没有得到链接
-
我的意思是你有一个链接,指向你正在尝试实现但不起作用的东西 - 所以我们可以看到你已经做了什么,看看我们是否能找出问题所在。跨度>
标签: html css media-queries