如何在css中更改下划线的宽度 [英] How to change width of underline in css

查看:1105
本文介绍了如何在css中更改下划线的宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在像这样的表中有一个单元格:

I have a cell in a table like this:

<td><b>Grand Total</b></td>

我需要在总计"文本下添加一行.我使用了text-decoration: underline;.效果很好,但是我需要更改下划线的颜色和粗细.我用text-decoration-color: red;添加颜色,但是不起作用.我该如何解决这个问题?

I need to give it a line under the text "Grand Total". I used text-decoration: underline;. It worked well, but I need to change the color and thickness of the underline. I used text-decoration-color: red; to add color but it doesn't work. How can I solve this problem?

推荐答案

使用border-bottom定义像这样的颜色线

use border-bottom define color cording like this

b {
    border-bottom: 1px solid red;
    padding: 0 0 4px;
}

<td><b>Grand Total</b></td>

这篇关于如何在css中更改下划线的宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆