How to set the thickness of strikethrough in css

WBOY
Release: 2021-12-09 16:41:11
Original
4915 people have browsed it

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}".

How to set the thickness of strikethrough in css

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 删除线粗细值;
Copy after login

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>
Copy after login

Output result:

How to set the thickness of strikethrough in css

<html>
<head>
<style type="text/css">
h2 {text-decoration: line-through 1px}
</style>
</head>
<body>
<h2>这是标题 2</h2>
</body>
</html>
Copy after login

Output result:

How to set the thickness of strikethrough in css

(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!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template