V
V
vasIvas2015-08-07 14:12:20
css
vasIvas, 2015-08-07 14:12:20

How to make css behavior the same in all browsers?

There is a button that, when the cursor hits it, smoothly appears and disappears smoothly.
In FireFox it works fine, but in Chrome the behavior changes. What can be done to
avoid this? If it helps, I use sass and gulp. Latest browsers.
Here is the code for which I sin, well, there is almost no other -

.container-mouseleave {
  opacity: 0.2;

  transition: opacity 0.3s, visibility 0.3s;
}

.container-mouseenter {
  opacity: 0.5;

  transition: opacity 0.3s, visibility 0.3s;
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Inchin ☢, 2015-08-07
@vasIvas

Use for each browser its own version:

-webkit-transition: all 0.1s //Это Chrome, Opera и прочие
-moz-transition: 0.2s.... //Mozilla
-ms-transition //IE

Vendor properties, if anything

M
MaoCzedun, 2015-08-07
@MaoCzedun

do cross-browser compatibility, browsers can support different style rules in different ways

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question