In css, you can use the "text-decoration" attribute to set the thickness of the strikethrough. When the attribute value is "line-through thickness value", a strikethrough will be defined and the thickness of the strikethrough will be set. The syntax is " Element {text-decoration:line-through thickness value}".
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
How to set the thickness of the strikethrough in css
In css, you can use the text-decoration attribute to set the strikethrough and set the thickness of the strikethrough Value, when the attribute value is line-through, a strikethrough will be defined.
The syntax is as follows:
text-decoration: line-through 删除线粗细值;
The example is as follows:
<html> <head> <style type="text/css"> h2 {text-decoration: line-through 15px} </style> </head> <body> <h2>这是标题 2</h2> </body> </html>
Output result:
<html> <head> <style type="text/css"> h2 {text-decoration: line-through 1px} </style> </head> <body> <h2>这是标题 2</h2> </body> </html>
Output result:
(Learning video sharing: css video tutorial)
The above is the detailed content of How to set the thickness of strikethrough in css. For more information, please follow other related articles on the PHP Chinese website!