css文字删除线怎么设置(html字体删除线)
CSS 删除线问题
只要再定义下面的CSS样式就可以了。
如代码是div class="mystyle"原价:20.5元/div
CSS就写成
.mystyle{font-family: "宋体"; vertical-align: middle;}
就能让删除线在同一行,并且所有浏览器都在同一行,不管文字还是数字。
font-family是让元素内的文字统一字体(统一IE7下的效果)
vertical-align: middle是让元素内的文字垂直居中(统一IE6下的效果)
怎样用CSS设计删除线的方法
在chrome里按F12,定位被覆盖的css的div层,在右侧的css里找到被划线的属性,然后往上找,找到同样的属性,没有被划线的,就是被它覆盖了,如图:
CSS怎么给数字中间加一横线
2种方法:
1、给这个数字添加css属性:text-decoration: line-through;
2、给这个数字添加标签:del。如:del9999/del。
text-decoration详解:
text-decoration : none || underline || blink || overline || line-through
none : 无装饰。text-decoration:none 无装饰,通常对html下划线标签去掉下划线样式。
blink : 闪烁
underline : 下划线。text-decoration:underline 下划线样式。
line-through : 贯穿线。text-decoration:line-through 删除线样式-贯穿线样式。
overline : 上划线。text-decoration:overline 上划线样式。
扩展资料:
我们进行对3个盒子对象分别设置对象内文字下划线、文字删除线样式、字体上划线样式。
1、css代码片段:
.divcss5{text-decoration:underline}
.divcss5_1{text-decoration:line-through}
.divcss5_2{text-decoration:overline}?
2、html代码片段:
div?class="divcss5"我被加下划线/div
div?class="divcss5_1"我被加贯穿删除线/div
div?class="divcss5_2"我被加上划线/div
如何用CSS改变上划线,下划线以及删除线的颜色
方法如下:
1:text-line-through-color:设置删除线的颜色。
2:text-overline: text-overline-color: 设置上划线的颜色
3:text-underline:text-underline-color:设置下划线的颜色
如何定义 css 删除线样式?
语法:
text-decoration : none || underline || blink || overline || line-through
参数:
none : 无装饰
blink : 闪烁
underline : 下划线
line-through : 贯穿线
overline : 上划线
怎么设置css里字体删除线的颜色!!!
div style="text-decoration:line-through; color:#FF0000"A style="color:#000000"dfsdfsd/A/div
这个例子,线是红色,字是黑色