如何保持下面的文字更粗,同时保持链接不变?
li
{
list-style-type:none;
font-size: 14px;
line-height:28px;
font-weight:thick
}
a:link
{
color:#3399CC;
}
...
<div id="left_column" >
<ul>
<li><a href="a.html">Im happy as I am</a> - I want to be less thick</li>
<li><a href="b.html">Im also happy as I am</a> - I also want to be less thick</li>
</ul>
</div>
答案 0 :(得分:2)
看起来你希望链接加粗,文字不那么厚(即不加粗)
请查看下面的代码,与您的代码相同,但我在您font-weight:normal;
代码的<li>
和font-weight:700;
中定义了<a>
。 Here's the working example
在您的代码中尝试此操作:
li
{
list-style-type:none;
font-size: 14px;
line-height:28px;
font-weight:normal;
}
a:link
{
font-weight: 700;
color:#3399CC;
}
<div id="left_column" >
<ul>
<li><a href="a.html">Im happy as I am</a> - I want to be less thick</li>
<li><a href="b.html">Im also happy as I am</a> - I also want to be less thick</li>
</ul>
</div>
答案 1 :(得分:0)
我认为this code可以回答您的问题。
<html>
<head>
<style>
body
{
color:#3399CC;
font-size: 10px;
}
li {
list-style-type:none;
font-size: 22px;
line-height:28px;
font-weight:thick
}
ol>li>a{
color:#3399CC;
font-size: 10px;
}
</style>
<body>
<div id="left_column" >
<ol>
<li><a href="a.html">Im happy as I am</a> I want to be less thick</li>
<li><a href="b.html">Im also happy as I am</a> I also want to be less thick</li>
</ol>
hree
</div>
</body>
</html>