Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History

product-preview-card-component

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Frontend Mentor - Product preview card component

Design preview for the Product preview card component coding challenge

Overview

Screenshot

screenshot screenshot-mobile

Question

Links

Author

how to set line-through and offset it?

I carefully observed the UI draft and found that this line is offset. Is there any way to add an offset to the line-through?

Yes, I find a css property text-decoration-skip-ink can do this. set text-decoration-skip-ink: none; and text-underline-offset: -4px; to the element. Of course, you need to set text-decoration: underline; to the element.

<del class="text-[13px] text-dark-grayish-blue">$169.99</del>