-4

我正在尝试制作一个网站(海绵),当我尝试做大胆的事情时,它就是行不通!看看它,看看它有多烦人!

我的代码: 哈斯特宾

4

1 回答 1

0

标题标签<h#>通常font-weight: bold默认应用。我不确定为什么您的所有文本都在标题中,但可能不应该。

将大部分文本放在段落<p>标签中,并调整 CSS 以根据需要格式化段落,使用:

p { /*Style goes here*/ }

或者,您可以将一个类应用于您的段落,以单独或分组调整其样式。如果您不确定如何使用,请在 Google 上查看 CSS 教程。

这只是对您的代码的快速编辑。它不会是完美的,但希望它能引导你朝着正确的方向前进。

<!DOCTYPE html>
<html>
<head>
<title>Sponge - Home</title>
<link href="https://fonts.googleapis.com/css?family=Quicksand" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<style>
.hotbar {
    background-color: #808080;
    height: 20%;
    width: 100%;
    font-family: 'Quicksand', sans-serif;
}
.about {
    font-family: 'Roboto', sans-serif;
}
</style>
</head>
<body>
<div class="hotbar" height="7%" width="100%">
<img align="left" src="http://www.spongemc.cf/home/images/logo.png" alt="logo" height="7%" width="7%">
<h1 align="center"><a style="text-decoration: none;" href="http://www.spongemc.cf/home/">Home</a></h1>
</div>
<div class="about">
<br /> <!-- Assuming all those empty header tags for for spaces - you could also use padding-top in the div or margin-top for the first h2 tag -->
<h2>What are we?<h2>
<p>We are a Minecraft server dedicated to people having fun!</p>
<p>You can have fun and play prison at <i>Sponge.minehut.gg</i>,</p>
<p>or you can play farming and Skyblock at <i>spongemc.net</i></p>
<p>Or you could just sit there doing nothing (I don't recomend this),</p>
<p>so what are you doing, <b>JOIN NOW!</b></p>
</div>
</body>
</html>
于 2018-09-06T00:57:10.923 回答