【问题标题】:Why are css transitions with hover not working? [duplicate]为什么悬停的css转换不起作用? [复制]
【发布时间】:2021-02-15 05:20:08
【问题描述】:

我的代码是这样的

#padmeni {
    width:140px;
    display:none;
    background-color:#5F9EA0;
    position:absolute;
    top:30px;
    left:160px;
    display:none;
    border-radius:2px; 
    opacity:0.9;
    padding-top:10px;
    -webkit-transition: display 1s ease-in;
    -moz-transition: display 1s ease-in;
    -o-transition: display 1s ease-in;
    transition: display 1s ease-in;
}

nav ul li:hover #padmeni {
    display:block;
}

【问题讨论】:

  • 不是每个人的第一语言都是英语。 smthu 之类的东西很糟糕。使用完整的单词。

标签: html css hover transition


【解决方案1】:

只有animatable properties 可以转换。 display 不是其中之一。

虽然没有过渡的中间点。

【讨论】:

    猜你喜欢
    • 2018-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-15
    • 1970-01-01
    • 1970-01-01
    • 2013-04-13
    相关资源
    最近更新 更多