我创建了一个 1000 像素宽度的网站。我想让它响应,但媒体查询并没有真正起作用。
有没有办法保持固定的 1000px 宽度但随着浏览器变小而使网站缩小?到目前为止,媒体查询似乎不起作用。
这是我的媒体查询:
关联:
媒体查询:
@media screen and (max-device-width: 600px) {
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6,
.grid_7,
.grid_8,
.grid_9,
.grid_10,
.grid_11,
.grid_12, .container {
width: 100%;
padding-left: 2%;
padding-right: 2%;
}
#index, #about, #services, #contact .logo, ul, .slide, .headSub, .aboutContent, .aboutText,
.division, .service_buzzwords, .services-content, .serv, .contactPage, .map{
float: none;
}
.nav ul, li, a{
display: block;
}
.division, .aboutImg img{
display: none;
}
.indexContent{
width: 100%;
}
.rw-sentence { font-size: 1em; }
img{
width: 70%;
margin-left: 15%;
margin-right: 15%;
}
}
@media screen and (max-width: 320px){
.rw-sentence { font-size: 0.5em; }
}
请帮忙。谢谢。