到目前为止,我的所有媒体查询都很好,除了这个。我有一个真正的iPad,我正在使用模拟器以及我的客户不喜欢他的徽标靠在屏幕的边缘,所以我想要做的就是给它一点填充或者保证金(填充也不起作用)。我认为另一双眼睛不会受伤 - 我在这里错过了什么?
@media screen only and (min-width:768px) and (max-width: 1024px) {
.site-header .home-link {
margin: 0 20px!important;
}
}
.site-header .home-link {
background: url(http://client.savorweb.com/INWS/wp-content/uploads/2015/04/iwns-logo.png) left no-repeat;
color: #141412;
display: block;
margin: 0 auto;
max-width: 1024px;
min-height: 150px;
padding: 0px 5px 0px 10px;
text-decoration: none;
width: 100%;
}
答案 0 :(得分:1)
您的媒体查询格式错误。它应该是:
@media only screen and (min-width:768px) and (max-width: 1024px)
强调仅屏幕而不是仅限屏幕。