CSS3 Transition not working

前端 未结 5 902
醉酒成梦
醉酒成梦 2020-12-17 08:51

I couldn\'t get transitions to work on this page, anybody has any idea why?

div.sicon a {
    transition: background 0.5s linear;
    -moz-transition: backgr         


        
5条回答
  •  不知归路
    2020-12-17 09:36

    HTML:

    /* whatever is required */

    CSS:

    .foo {
        top: 0;
        transition: top ease 0.5s;
    }
    
    .foo:hover{
        top: -10px;
    }
    

    This is just a basic transition to ease the div tag up by 10px when it is hovered on. The transition property's values can be edited along with the class.hover properties to determine how the transition works.

提交回复
热议问题