好的,所以我正在用 HTML/Css 做一个网站问题是,当我单击“主页”按钮时,它会将我定向到我的 css 链接。我的主页被称为“new.html”,当我点击“home”而不是 background.css 时,我希望它去那里这是我的“New.html”
<html>
<head>
<link rel="stylesheet" type="text/css" href="background.css"/>
</head>
<h1>Bully-Free Zone</h1>
<h2>"Online harassment has an off-line impact"</h2>
<a href="background.css" class="nav-link">Home</a>
</body>
</html>
背景.css
body{/* IE10 */
background-image: -ms-linear-gradient(top left, #FC5B5B 0%, #555BB5 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(top left, #FC5B5B 0%, #555BB5 100%);
/* Opera */
background-image: -o-linear-gradient(top left, #FC5B5B 0%, #555BB5 100%);
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(top left, #FC5B5B 0%, #555BB5 100%);
/* Proposed W3C Markup */
background-image: linear-gradient(top left, #FC5B5B 0%, #555BB5 100%);
}
h1{color:black;text-align:center;font-size:40px;font-family:broadway;
}
h2{color:black; text-align:center;font-size:35px;font-style:italic;}
a{color:black; text-align:left; font-size:25px;font-family:broadway;}
a.nav-link:link
{
color: black;
text-decoration: none;
}
a.nav-link:visited
{
color: black;
text-decoration: none;
}
a.nav-link:hover
{
color: black;
text-decoration: none;
}
a.nav-link:active
{
color: black;
text-decoration: none;
}