简体   繁体   中英

How to make a strikethrough look like an x

I am trying to make a page that uses only jquery to make tabs, not jQuery UI. At the top of the page there is an h1 , like this:

 <h1>Jquery <del>UI</del> Tabs</h1> 

I want to know if I can make the strikethrough look like an x, like this:

You could do something like this using CSS:

 del { text-decoration: none; position: relative; } del:before { color: #000; content: 'X'; display: block; font-family: "arial"; font-size: 1em; font-weight: normal; left: 0; position: absolute; text-align: center; top: 0; width: 100%; } 
 <h1>Jquery <del>UI</del> Tabs</h1> 

Essentially all it does it place an "X" on top of the text using the :before sudo selector.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM