我设置了台式机和移动端Css,我将台式机放在index.html上,移动端放在m.index.html上,但是桌面在台式机/笔记本电脑和mobile.How上都出现了我可以让移动端工作吗
发布于 2014-01-18 11:00:07
你不需要单独的html和css文件。
按照Seth McClaine的建议,在html的<head>
元素中添加一个viewport meta标签,并使用media queries为平板电脑/手机使用单独的css :-)-类似于:
// main css
.foo {
width: 1000px;
}
// Mobile:
@media (max-width: 600px) {
.foo {
width: 500px;
}
}
https://stackoverflow.com/questions/21199062
复制相似问题