K
K
kimqar_ver2020-05-08 10:21:55
css
kimqar_ver, 2020-05-08 10:21:55

How to remove the background on all elements on the page on button click?

There is a version of the site for the visually impaired. How to remove the background in all elements on the page on button click?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ankhena, 2020-05-08
@kimqar_ver

Yes, just when you click on the button, hang a class on the body

.no-bg, .no-bg * {
background: none
}

It is better, of course, to remove specific elements, rather than using *. But for this you need to know them or search through js.
And do not forget that the icons on the site are often made using bg.

N
n1ksON, 2020-05-08
@n1ksON

If you need to remove all of them, then you can. And if necessary, return background to certain elements.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question