给需要添加下划线的元素应用如下css样式即可 text-decoration: underline;示例如下:1. 给需要添加下划线的元素一个标记,这里设置为一个名叫underline的类我不加下划线我要加下划线2. 应用上面给出的添加下划线的样式 h2{color:blue;} /*设置文字颜色为蓝色*/ h2.underline{text-decoration: underline;} /*只为有underline标识的元素添加下划线*/3. 效果如下
text-decoration:underline 距离不可以调整 但可以变相实现,用border-bottom 例如CSS中鼠标放在文字上时出现下划线代码是什么 CSS中的代码 p{border-bottom:1px solid #000;margin-bottom:文字与线之间的距离;} 不明白的话,发站内信息给我
下划线加粗
text-decoration:underline;下划线text-decoration:overline;上划线text-decoration:line-through;中划线还有就是可以同时给一个元素这三种属性.希望对你有帮助.
你好!/div>div*********************<.underline {text-decoration: underline;div class="希望对你有所帮助,望采纳.
不能做到下划线和文字的颜色不一样,但可通过设置下边框的颜色来实现 a:link { color: #036; text-decoration: none; border-bottom: 1px solid #666;} a:hover{ color: #f90; text-decoration: none; border-bottom: 1px solid #f90; }
你好!a{color: #0162f4;} 鼠标离开的时候颜色为蓝色,#0162f4颜色代码自己改 a:hover{text-decoration:underline;color: #C20C0C;} 鼠标经过的时候出现下划线text-decoration:underline,不要下划线改成text-decoration:none即可,color: #C20C0C为鼠标经过时字体显示的颜色!如果对你有帮助,望采纳.
您好,一般默认时就会加的.也可以加如下代码:<style type="text/css"><!-- a:link {text-decoration: underline;} a:visited {text-decoration: underline;} a:active {text-decoration: underline;} a:hover {text-decoration: underline;}--></style>
直接给li标签设置下划线就可以了,
下面我们做一个这样的链接:未被点击时超链接文字无下划线,显示为蓝色;当鼠标在链接上时有下划线,链接文字显示为红色;当点击链接后,链接无下划 线,显示为绿色. 实现方法很简单,在源代码的和之间加上如下的CSS语法控制: