O
O
onahapa2014-11-26 01:49:05
Mozilla Firefox
onahapa, 2014-11-26 01:49:05

How to properly use filter in FF?

Friends, everything works in Chromule, but the Fire Fox refuses to eat (I won’t say anything about the brothers Donkey and Donkey at all :)).

.k { 
  background: url(../2.jpg) repeat scroll 0 0 / 100% 100% rgba(0, 0, 0, 0); 
  height: 100%;
  width: 50%;
  position: absolute;
  -webkit-filter: grayscale(100%);
  -moz-filter: grayscale(100%);
  transition: 0.5s all;
}
.k:hover { -webkit-filter: grayscale(0%); -moz-filter: grayscale(0%);}

As you understand, I need to make a picture in black and white, and when hovering it in color, and not sharply, but smoothly.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Taratin, 2014-11-26
@onahapa

Use svg filters
https://developer.mozilla.org/en-US/docs/Web/CSS/filter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question