Answer the question
In order to leave comments, you need to log in
How to make Yandex.Maps on the site initially displayed in black and white?
I have the following fragment in my layout:
The site must have Yandex.Maps. As I understand it, initially they should be black and white, and when clicked, they should already open in their usual form. How to do it ?
Answer the question
In order to leave comments, you need to log in
<div id="map" class="black-and-white"></div>
.black-and-white {
filter: grayscale(100%);
}
document.querySelector('#map').addEventListener('click', function() {
this.classList.remove('black-and-white');
}, { once: true });
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question