怎么让css的属性加中划线

1、首先,打开html编辑器,新建html文件,例如:index.html。2、在index.html中的标签中,输入css代码:body{text-decoration: line-through;}。3、浏览器运行index.html页面,此时用css成功让文本添加了中划线。加中划线: text-decoration:line-through;text-decoration 属性规定添加到文本的修饰。注释:...
怎么让css的属性加中划线
加中划线: text-decoration:line-through;

text-decoration 属性规定添加到文本的修饰。
注释:修饰的颜色由 "color" 属性设置。
说明
这个属性允许对文本设置某种效果,如加下划线。如果后代元素没有自己的装饰,祖先元素上设置的装饰会“延伸”到后代元素中。不要求用户代理支持 blink。
默认值:none
继承性:no
版本:CSS1
JavaScript 语法:object.style.textDecoration="overline"

浏览器支持
所有主流浏览器都支持 text-decoration 属性。
注释:任何的版本的 Internet Explorer (包括 IE8)都不支持属性值 "inherit"。
注释:IE、Chrome 或 Safari 不支持 "blink" 属性值。

none 默认。定义标准的文本。
underline 定义文本下的一条线。
overline 定义文本上的一条线。
line-through 定义穿过文本下的一条线。
blink 定义闪烁的文本。
inherit 规定应该从父元素继承 text-decoration 属性的值。2012-04-06
需要准备的材料分别有:电脑、浏览器、html编辑器。
1、首先,打开html编辑器,新建html文件,例如:index.html。

2、在index.html中的<style>标签中,输入css代码:body{text-decoration: line-through;}。

3、浏览器运行index.html页面,此时用css成功让文本添加了中划线。

2019-07-11
加中划线: text-decoration:line-through;
text-decoration 属性规定添加到文本的修饰。
注释:修饰的颜色由 "color" 属性设置。2019-10-17
text-decoration:line-through;2012-04-06
mengvlog 阅读 8 次 更新于 2025-06-20 01:22:46 我来答关注问题0
  •  翡希信息咨询 css字体划线如何设置?文字加中划线方法

    CSS设置文字中划线的方法主要有两种:使用CSS属性textdecoration:属性单词:textdecoration中划线值:linethrough示例代码:css.strikethrough {textdecoration: linethrough;}在HTML中应用这个CSS类:html原价:¥200.00现价:¥120.00使用HTML标签:标签:示例代码:html原价:¥200.00现价:¥120.00总结: ...

  • 1、CSS属性单词与代码 单词:text-decoration 中划线值 text-decoration:line-through 2、HTML中划线标签 S标签 被加中划线 二、文字中划线div css实例 文字加中划线实例zhx{ text-decoration:line-through}原价:¥200.00现价:¥120.00 效果如下:CSS设置 text-decoration:line-through...

  • 1、首先,打开html编辑器,新建html文件,例如:index.html。2、在index.html中的标签中,输入css代码:body{text-decoration: line-through;}。3、浏览器运行index.html页面,此时用css成功让文本添加了中划线。

  • 1、给这个数字添加css属性:text-decoration: line-through;2、给这个数字添加标签:del。如:9999。text-decoration详解:text-decoration : none || underline || blink || overline || line-through none :  无装饰。text-decoration:none 无装饰,通常对html下划线标签去掉下划线样式。blink :  闪...

  •  高昂超 怎么给字加上中间划线?

    一般论坛如果你只是发言评论的话,字体设置部分就有相关的设置。如果用css的话,就要看论坛是否支持html输入了。

檬味博客在线解答立即免费咨询

CSS相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部