我刚刚开始使用 CSS,在为链接添加颜色时遇到了一些问题。当我添加链接颜色时,它不起作用,所以我尝试自己修复它,但只会把我的网站搞得更糟。这是我的代码。
<html>
<head>
<title> website </title>
</head>
<style type="text/css">
body
{
background-color:#474747;
color:#e1e1e1;
font-family:"Courier New";
text-align:center;
{
a:link
{
color:#00FFFF;} /* unvisited link */
a:visited
{
color:#4DFF4D;} /* visited link */
a:hover
{
color:#00FFFF;} /* mouse over link */
a:active
{
color:#00FFFF;} /* selected link */
}
h1
{
font-size:40;
}
h3
{
font-size:20;
text-decoration:underline;
}
p
{
font-size:12;
}
</style>
<body>
<h1> heading </h1>
<hr size="3" color="red" />
<h3>Welcome!!!</h3>
<p>Welcome to my website!</p>
<h3>Links</h3>
<p><a href="http://www.youtube">Youtube</a></p>
</body>
</html>
Html 代码或 Css 代码中有什么问题吗?请帮助。
从正确闭合牙套开始,让我们知道进展如何
body
{
background-color:#474747;
color:#e1e1e1;
font-family:"Courier New";
text-align:center;
{
应该是
body
{
background-color:#474747;
color:#e1e1e1;
font-family:"Courier New";
text-align:center;
}
我是一名优秀的程序员,十分优秀!