Three ways to add strikethrough to text with html and CSS (graphic)
The annual Double Eleven hand-chopping festival is coming soon. When you visit Taobao, you will definitely pay attention to the price of the product. Have you noticed the strikethrough added to the original price of the product? As a front-end developer, you know how to use CSS to give Do you strikethrough the text? This article summarizes three methods for adding strikethrough, including strikethrough tags in HTML and strikethrough styles in CSS. It has certain reference value, and interested friends can take a look. There are three ways to add a strikethrough to text, one is the text-decoration style in CSS, the other is the tag, and the last is Label. Method 1: Use text-decoration in CSS to set the strikethrough style Example description: Set the price of the product to be deleted in the tag, Give the tag a class name p, and add CSS style text-decoration: line-through to it, and it can be realized. The specific code is as follows: Original price of 30 pieces of deep moisturizing mask¥399 Double Eleven mask 30 pieces ¥299 Effect picture: Method 2: Use in html to delete tags Example description: directly use the tag in html to add a strikethrough to…