vendredi 1 juillet 2016

fade transition to a div on load [duplicate]

This question already has an answer here:

Can you apply a fade transition to a div on load using CSS only? I have a div, which initially should be transparent and after a few seconds should change to yellow. I know it is possible to do this on state change (e.g. hover). Can anyone help?

Cheers

#content {
    background-color: #FF0;
    height: 100px; width: 100px;
    -webkit-transition: background-color 10000ms linear;
    -moz-transition: background-color 10000ms linear;
    -o-transition: background-color 10000ms linear;
    -ms-transition: background-color 10000ms linear;
    transition: background-color 10000ms linear;
}
<div id="content"></div>

Aucun commentaire:

Enregistrer un commentaire