Sulung Nugroho Sulung Nugroho - 3 months ago 8
CSS Question

how to keep line-through on hover

How to keep

line-through
on hover?

CODE

<style>
.strike { text-decoration: line-through }
</style>

<a href="#" class="strike" >Not Applicable</a>

Answer

add .strike:hover to the declaration

.strike,
.strike:hover {
  text-decoration: line-through
}
<a href="#" class="strike">Not Applicable</a>