csscss-transitionsvendor-prefix

-moz- and -webkit- do I need to use this nowadays?


I did a website recently and I didn't add no -moz and -webkit in my css.

like this:

#mydiv{
position: absolute;
width: 100px;
height: 100px;
border:1px solid #000;
border-radius: 2px;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
transition: width 2s;
background: linear-gradient(red, yellow);
}

Question: is it OK to keep it like above or do I need to add:

background: -webkit-linear-gradient(red, yellow);
background: -o-linear-gradient(red, yellow);
background: -moz-linear-gradient(red, yellow);

-webkit-border-radius: 2px;
-moz-border-radius: 2px;

-webkit-transition: width 2s;

-ms-transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);

Solution

  • For some properties you still need, for others not.

    A good, if not the best way (who I am to say that), to know which properties still need is looking at Can I use? and/or should I prefix?