+ 5
[Not resolved] Change color if ()
how to do this in js : if (in the document you find red) { change red to blue; }
3 ответов
+ 4
it's exactly what I want but with the fill of a SVG ^^ thanks !
+ 4
I have 2 squares by svg (so <rect>)
<svg fill='rgba (187,161,97,0.9)'>
<rect id='...' clas='...' x='...' y='...' width='...' height='...' />
</svg>
draggable
when 2 squares intersect, their intersection become :
rgba (187,161,97,1)
And I want this intersection become #EEE
so I want the rgba (187,161,97,1) become #EEE
+ 3
Hello. Here is a little example I've put together to demonstrate how you can filter all elements on a page by their background color values and then changes the background color of those elements (not sure if background color is what you're looking for, specifically, but this can be adjusted to account for other properties):
https://codepen.io/dustinoverby/pen/aLLMYq?editors=1010