所以我正在完成一项学校作业,只需制作一个说明我喜欢的内容的网页,然后我就这些主题进行讨论(我要注意它的内容)只有基本的HTML,我用CSS做的所有东西都是额外的。问题是,在我的网页上,我放了一堆换行符来测试我的片段链接,不仅片段链接不起作用,但由于某种原因,我甚至无法使用我的鼠标滚动滚轮向下滚动到它。所以这里是代码(除了标题,第一个头标记和第一个HTML标记)P.S。我对HTML和CSS很陌生,所以我查了很多参考资料
<!DOCTYPE html>
<html>
<head>
<title>About me</title>
<style>
body {
background-color: #dadced;
font-family: verdana, sans-serif;
width:75%;
}
p, h1, h2 {
text-decoration: none;
color: #7b967f;
padding: 10px;
}
a {
text-decoration: none;
color:#7b967f
}
img {
display:block;
margin:auto;
}
h2.link {
padding-right:30px;
text-align: left;
}
.img-circle {
border-radius: 50%;
}
#game-txt {
background-color: #e5d3c3;
border-radius: 25px;
}
#comp-txt {
background-color: #e4e58b
border-radius: 25px;
}
#film-txt {
background-color: #ef9e9e;
border-radius: 25px;
}
div#gif {
width: 100%;
height:75%;
border-radius: 25;
}
div#gcontainer {
position:relative;
width: 800px;
height:450px;
padding-left:250px;
}
div#img1 {
position: absolute;
padding-left: 146px;
padding-bottom: 50;
}
div#img2 {
position: absolute;
padding-left:546px;
padding-bottom: 50;
}
div#img3 {
position: absolute;
padding-left:932px;
padding-bottom: 50;
}
</style>
</head>
<body>
<div id=gcontainer>
<div id=gif>
<img src="chapter select gif/Chapter_select.gif" alt="chapter select
sign" width="800" height="500">
</div>
</div>
<div id=img1>
<img class=img-circle src="Game.png" alt="Game Banner" width="130"
height="131">
<h2><a href="#game">1. Games</a></h2></div>
<div id=img2>
<img class=img-circle src=computer.png alt="Picture of a CPU with
glowing blue light" width="130" height="131">
<h2 class=link>2. Computers</h2>
</div>
<div id=img3>
<img class=img-circle src="Film making.png" alt="Picture of film"
width="130" height="131">
<h2 class=link>3. Film Making</h2>
</div>
<h2><a name="game" /> Games</h>
</body>