line-through

How to make line-through wider/bigger than text/element using CSS

点点圈 提交于 2019-12-07 03:52:30
问题 Can you please let me know how I can force CSS to make the line-through property wider than element width ? For Example <h3 style="text-decoration:line-through">50</h3> and result looks like now how I can make the line wider than element to be more obvious? Like 回答1: You can use   which is a cheesy way to go for <div>  HELLO  </div> Demo Or you can do is, use :before and :after pseudo with content property Demo div { text-decoration:line-through; } div:before, div:after { content: "\00a0\00a0

How to make line-through wider/bigger than text/element using CSS

五迷三道 提交于 2019-12-05 08:57:44
Can you please let me know how I can force CSS to make the line-through property wider than element width ? For Example <h3 style="text-decoration:line-through">50</h3> and result looks like now how I can make the line wider than element to be more obvious? Like You can use   which is a cheesy way to go for <div>  HELLO  </div> Demo Or you can do is, use :before and :after pseudo with content property Demo div { text-decoration:line-through; } div:before, div:after { content: "\00a0\00a0"; } Note : Using a general selector here, consider using class or an id to target the element specifically,

How to change the strike-out / line-through thickness in CSS?

感情迁移 提交于 2019-12-03 01:34:01
问题 I'm using the text-decoration: line-through in CSS, but I can't seem to find any way to vary the line thickness without inelegant hacks like <hr> or image overlays. Is there any elegant way to specify the thickness of a line-through? 回答1: Here's a pure CSS method that doesn't require any unnecessary wrapper elements. As an added bonus, not only can you adjust the thickness of the strikeout, but you can control its color separately from the text color: .strikeout { font-size: 4em; line-height:

How to change the strike-out / line-through thickness in CSS?

天大地大妈咪最大 提交于 2019-12-02 15:03:21
I'm using the text-decoration: line-through in CSS, but I can't seem to find any way to vary the line thickness without inelegant hacks like <hr> or image overlays. Is there any elegant way to specify the thickness of a line-through? Here's a pure CSS method that doesn't require any unnecessary wrapper elements. As an added bonus, not only can you adjust the thickness of the strikeout, but you can control its color separately from the text color: .strikeout { font-size: 4em; line-height: 1em; position: relative; } .strikeout::after { border-bottom: 0.125em solid red; content: ""; left: 0;

Inherited Text-Decoration style

ぐ巨炮叔叔 提交于 2019-11-28 11:07:37
How would I negate or remove a parents text-decoration style? For example in the following, both the text and the anchor have a text-decoration of line-through, is there a way to not have that applied to the anchor tag? <span style="text-decoration:line-through;"> Dead Text <a href="#" style="text-decoration:underline;color:Red;">Not Dead Text</a> </span> NOTE: wrapping the inner text in a span isn't an easy option with what I have so I'm looking for a solution based on the css styles if possible. Potherca The following line in the accepted answer is incorrect: Any text decoration setting on a

Inherited Text-Decoration style

半腔热情 提交于 2019-11-27 05:59:19
问题 How would I negate or remove a parents text-decoration style? For example in the following, both the text and the anchor have a text-decoration of line-through, is there a way to not have that applied to the anchor tag? <span style="text-decoration:line-through;"> Dead Text <a href="#" style="text-decoration:underline;color:Red;">Not Dead Text</a> </span> NOTE: wrapping the inner text in a span isn't an easy option with what I have so I'm looking for a solution based on the css styles if