gpt4 book ai didi

html - CSS-文本修饰问题

转载 作者:太空宇宙 更新时间:2023-11-03 23:06:54 26 4
gpt4 key购买 nike

所以如果这个问题已经被问到,我会提前道歉,但我还是会提一下。基本上我一直在处理的 HTML 文档存在问题。我为每个不同链接的 span 标签中的链接设置了一个规则,因为我希望它们具有不同的文本装饰属性,但它似乎并没有应用它们。这是我的代码:

<!DOCTYPE html>
<html>
<head>
<title> MSCC Software </title>
<link type="text/css" rel="stylesheet" href="mscccss.css">
</head>
<body> <!-- I will do an early apology if there is any bad code -->
<div id="header">
<p id="topline"> MSCC Software </p>
<p id="bottomline"> www.mscc.com </p>
</div>
<div id="sidebar">
<span id="google"> <a href="http://www.google.com"> Google</a> </span>
<span id="example"> <a href="http://www.example.com"> Example </a> </span>
<span id="debt"> <a href="http://www.usadebtclock.org"> Debt </a> </span>
</div>
<div id="content">
<p> Happy Holidays </p>
<img src="http://res.freestockphotos.biz/pictures/12/12626-illustration-of-a-decorated-christmas-tree-pv.png" />
<p> From MSCC! </p>
</div>
<p id="credit"> Created By PharellPharell </p>
</body>
</html>

现在我的 CSS:

    body{
height: 970px;
background-color: rgba:(223,223,223,80%);
font-family: Verdana;
margin-top: 15px;
margin-bottom: 15px;
margin-right: 3%;
margin-left: 3%;
}


#header{
height: 12%;
border: solid red;
background-color: rgb(127,0,0);
border-radius: 25px;
text-align: center;
color: #FFFA7C;
margin-bottom: 15px;
}

#topline{
font-size: 30px;
margin-bottom: 0px;
}


#bottomline{
font-size: 20px;
}

#sidebar{
height: 75%;
width: 15%;
border: solid red;
border-radius: 25px;
background-color: rgb(127,0,0);
text-align: center;
padding-right: 25px;
display: inline-block;
float: left;
}

#google{
font-size: 25px;
color: #EC00BC;
text-decoration: none;
display: block;
padding-bottom: 10px;
}

#example{
font-size: 25px;
color: #EC00BC;
text-decoration: overline;
display: block;
padding-bottom: 10px;
}

#debt{
font-size: 25px;
color: rgb(7,239,20);
text-decoration: none;
}

#content{
height: 75%;
width: 77%;
background-color: rgba(0,119,31,0.9);
border: solid rgb(127,0,0);
border-radius: 25px;
color: rgb(127,0,0);
font-size: 72px;
text-align: center;
float: right;
}

img{
height: 300px;
}

#credit{
font-size: 40px;
color: rgb(127,0,0);
font-family: Arial;
padding-left: 550px;
}

是的,基本上就是这样。我不知道该怎么办,如果我犯了一个愚蠢的错误,我深表歉意。帮助将不胜感激,

非常感谢!

顺便说一句。有趣的事实 - PharellPharell 是我的 GitHub 用户名,如果你想查找我,你可以在那里找到我。

最佳答案

我认为您应该定位 a 标签,而不仅仅是它们所包含的 span。例如:

#google a{
text-decoration:none;
}

关于html - CSS-文本修饰问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34407278/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com