注意了,现在的谷歌不兼容响应式布局的

来源:2-2 CSS3-Media Query简单案例

似朝朝我心

2020-06-01 15:13

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<link rel="stylesheet" type="text/css" href="./index.css" media="only screen and (max-width:480px)"/>

<style type="text/css">

@media screen and (min-width: 490px) {

body {background: blue;}

}

</style>

</head>

<body>

</body>

</html>


换成IE或者火狐,Edge可以

写回答 关注

1回答

  • WANTEDss
    2020-07-27 19:26:05

    你的 meta 貌似少设置了点东西:

      <meta name="viewport" content="width=device-width, initial-scale=1.0">


认识响应式布局

使用Bootstrap前端框架,本教程让网站兼容不同终端不再是梦

132121 学习 · 278 问题

查看课程

相似问题