Get the App
SLTechnology News&Howtos  ›  Development  › 

How to achieve the effect of deleting line in the middle of price between HTML and css

Shulou Source: shulou.com Published: 2022-06-01 09:33:42 10月02日 Update

This article mainly explains the "HTML and css how to achieve the price through the deletion line effect", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "HTML and css how to achieve the price through the deletion line effect" bar!

The underscore is roughly done with a delete line in the HTML tag. If you want to CSS fancy organization, you should adopt the text-decoration pattern.

Dash (delete line) pattern code in CSS:

Text-decoration:line-through

When you need to underline the cost number, you can configure it with text-decoration:line-through.

Here CSS5 adopts HTML delete underline label and CSS underline (both ends of the line) to complete the underlined layout of the original promotion price.

1. Complete the html css code for an example

Cost underlined CSS agency CSS5.huaxian {text-decoration:line-through}

Discount value: 100 yuan, original price: 200 yuan

Preferential value: 80 yuan, original price: 220 yuan

2. Screenshot of underlined structure

In the actual HTML organ, no matter whether you choose the CSS style agency dash, or the HTML tag construction dash, the decision is not necessary, the demand is reasonable according to the demand to determine the appropriate construction method, html delete line through line label and CSS smooth understanding line in the underline style can be applied.

Thank you for your reading, the above is the content of "HTML and css how to achieve the effect of the deletion line in the middle of the price". After the study of this article, I believe you have a deeper understanding of how to achieve the effect of the deletion line in the middle of the price of HTML and css. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Price effect label agency learning price code value content original price style pattern demand discount free flow both ends resolution method example reality Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Linux OPPO Reno MySQL Apple