gpt4 book ai didi

HTML/CSS 媒体查询

转载 作者:行者123 更新时间:2023-11-27 23:34:40 25 4
gpt4 key购买 nike

我已经正确引用了视口(viewport)元标记和样式表链接,但我的媒体查询仍然不起作用。

除媒体查询样式外,所有 CSS 样式均适用。

    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

<link rel="stylesheet" href="main.css" type="text/css">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

最佳答案

如果您在 main.css 中编写了媒体查询,它不会覆盖 Bootstrap 和其余样式表的默认媒体查询,因为您需要在所有默认样式表之后调用您的 main.css。希望这会有所帮助:)

关于HTML/CSS 媒体查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57306258/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com