gpt4 book ai didi

html - 当我放大屏幕时,我的响应式网站没有响应

转载 作者:太空宇宙 更新时间:2023-11-04 03:30:39 26 4
gpt4 key购买 nike

我想让我的网站响应,但它没有响应我想要的最小高度变化。我希望它在达到断点时改变颜色,以便有人可以分析我的 CSS 和 html 并查看错误所在。

谢谢,

CSS:

@media screen and (min-width: 480px) {
body {background: navy; }
}
@media screen and (min-width: 660px;) {
body {
background: darkgreen;}
}

HTML:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Dalexis Peguero | Designer </title>
<link rel="stylesheet" href="normalize.css">
<link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,700italic,800italic,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="main.css">
<link rel="stylesheet' href="responsive.css">
</head>
<body>
<header>
<a href="index.html" id="logo">
<h1>Dalexis Peguero</h1>
<h2>Designer</h2>
</a>
<nav>
<ul>
<li><a href="index.html">Portfolio</a></li>
<li><a href="about.html" >About</a></li>
<li><a href="contact.html" class="selected">Contact</a></li>
</ul>
</nav>
</header>
<div id="wrapper">
<section>
<h3>General Information</h3>
<p>I am not currently looking for new design work, but I am available when I feel confident with my skills. </p>
<p>Please reach me with email or facebook when it's not an emergency, but if you need an urgent consultation just call me.</p>
</section>
<section>
<h3> Contact Details </h3>
<ul class="contact-info">
<li class="phone"><a href="tel:555-5555">555-5555</a></li>
<li class="mail"><a href="mailto:dalexispeguero@gmail.com">dalexispeguero@gmail.com</a></li>
<li class="twitter"><a href="http://twitter.com/intent/tweet?screen_name=nickrp">@Dpeguero</a></li>
</ul>
</section>
<footer>
<a href="http://twitter.com/nickrp"><img src="img/twitter-wrap.png" alt="twitter logo" class="social-icon"></a>
<a href="http://facebook.com/dalexisp"><img src="img/facebook-wrap.png" alt="facebook logo" class="social-icon"></a>
<p>&copy; 2014 Dalexis Peguero. </p>
</footer>
</div>
</body>
</html>

最佳答案

这可能是你的问题:

<link rel="stylesheet' href="responsive.css">

没有正确关闭 rel 中的引用,因此更改为:

<link rel="stylesheet" href="responsive.css">

如果没有正确关闭,它将不会加载resposive.css文件

另外你这里的分号不正确:

 @media screen and (min-width: 660px;)

去掉它,应该是这样的:

@media screen and (min-width: 660px) 

关于html - 当我放大屏幕时,我的响应式网站没有响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26386001/

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