首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >链接文本比普通文本更粗

问链接文本比普通文本更粗
EN

Stack Overflow用户
提问于 2012-10-09 04:04:46
回答 2查看 119关注 0票数 0

如何使下面的文本更厚,同时保持链接的原样?

代码语言:javascript
复制
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>&nbsp-&nbspI want to be less thick</li>
    <li><a href="b.html">Im also happy as I am</a>&nbsp-&nbspI also want to be less thick</li>
    </ul>    
</div>
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-10-09 04:20:08

看起来你想让链接加粗,文本不要太粗(不加粗)

看看下面的代码,除了我在<li>中定义了font-weight:normal;,在<a>标记中定义了font-weight:700;之外,与您的代码相同。Here's the working example。

在您的代码中尝试以下内容:

代码语言:javascript
复制
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>&nbsp-&nbspI want to be less thick</li>
    <li><a href="b.html">Im also happy as I am</a>&nbsp-&nbspI also want to be less thick</li>
    </ul>    
</div>
票数 2
EN

Stack Overflow用户

发布于 2012-10-09 14:25:22

我想this code已经回答了你的问题。

代码语言:javascript
复制
<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>&nbsp;&nbsp;I want to be less thick</li>
    <li><a href="b.html">Im also happy as I am</a>&nbsp;&nbsp;I also want to be less thick</li>
    </ol>    
    hree
</div>
</body>
</html>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12788683

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档