今天,我一直在尝试根据视频游戏中的角色制作一个小型网站,我决定实现一些标签,以将内容分成不同的部分。我决定在角色具有的四个“功能”中的每一个上放置标签,然后突然使div元素中段落元素内的文本变为粗体。我不相信自己让他们大胆,有人知道为什么会这样吗?
我为head元素中的div标签设置了font-weight属性值400,以解决此问题,但是我认为这不是必需的。
我认为我已经忽略了这里的一些基本知识,并且对我的工作有不同的看法以发现错误会很好。感谢任何可以帮助我的人,我在下面发布了代码。
码:
<!--
<!DOCTYPE html>
<head>
<style>
body {
background-color:purple;
color:peachpuff;
}
img {
float:left;
}
p {
color:peachpuff;
font-size:20px;
}
div {
color:peachpuff;
font-size:20px;
font-weight:400;
}
h3 {
font-size:30px;
margin:0px;
text-decoration:underline;
}
</style>
</head>
<body
<h1 style="color:peachpuff;text-align:center;font-size:64px;text-decoration:underline;margin:0px;">Enigma</h1>
<p style="margin:0px;text-align:center;">Enigma is a hero from Dota 2.</p>
<h2 style="font-size:45px;margin:47px 50px 0px;text-decoration:underline;color:peachpuff;">Abilities<h2>
<div>
<h3>Malefice</h3>
<p style="font-size:18px;margin-top:3px;">Focuses Enigma's power on a target, causing it to take damage and become repeatedly stunned for multiple instances. An instance strikes every 2 seconds.</p>
</div>
<div>
<h3>Demonic Conversion</h3>
<p style="font-size:18px;margin-top:3px;">Transforms a creep into three fragments of Enigma himself. These eidolons are all under Enigma's control, and repeated successful attacks cause them to multiply. When this happens, the eidolons have their health restored.</p>
</div>
<div>
<h3>Midnight Pulse</h3>
<p style="font-size:18px;margin-top:3px;">Steeps an area in dark resonance, damaging enemy units based on their max HP.</p>
<p style="color:purple;margin:-1px 0px 0px 0px;">lorem ipsum.</p>
</div>
<div>
<h3>Black Hole</h3>
<p style="font-size:18px;margin-top:3px;">Summons a vortex that sucks in nearby enemy units. Enemies affected by Black Hole cannot move, attack, or cast spells.</p>
</div>
</body>
-->