编辑CSS“下划线"属性的线宽 [英] Edit line thickness of CSS 'underline' attribute

查看:547
本文介绍了编辑CSS“下划线"属性的线宽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为您可以在CSS中加任何下划线,如下所示:

Since you can underline any text in CSS like so:

H4 {text-decoration: underline;}

然后您又如何编辑绘制的线",您将在线上获得的颜色轻松地指定为颜色:红色",但是如何编辑线的高度(即粗细)呢?

How can you also then edit that 'line' that is drawn, the color you get on the line is easily specified as 'color: red' but how does one edit the height of the line, i.e. the thickness?

推荐答案

这里是实现此目的的一种方法:

Here is one way of achieving this :

HTML:

<h4>This is a heading</h4>

<h4><u>This is another heading</u></h4>

CSS:

 u {
    text-decoration: none;
    border-bottom: 10px solid black;
  }​

这里是一个示例: http://jsfiddle.net/AQ9rL/

这篇关于编辑CSS“下划线"属性的线宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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