How to use css text modifier text-decoration
This article mainly introduces how to use css text modification text-decoration, with certain reference value, interested friends can refer to, I hope you have a lot of harvest after reading this article, let Xiaobian take you to understand.
In HTML, you can use s tags, u tags to achieve the effect of text lines, but in order to ensure the principle of separation of structure and style, CSS is generally used to achieve style, improve the readability and maintainability of code;
1. Hyperlinks are underlined by default. You can use text-decoration: none to clear the underline of hyperlinks.
2. Underlines are often used for the key marks of articles. The middle line is used to cross out the original price when promoting sales. The upper line basically has no application scenario.
examples
div{ width: 200px; } .p1{ text-decoration: underline; } .p2{ text-decoration: line-through; } .p3{ text-decoration: overline; }
underlined
and dashes.
overline
Thank you for reading this article carefully. I hope that Xiaobian's "how to use css text modification text-decoration" article will be helpful to everyone. At the same time, I hope that everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!