【问题标题】:Change two attribute of html element with animation by css3通过css3用动画改变html元素的两个属性
【发布时间】:2016-01-12 20:41:03
【问题描述】:

我希望 top 和 box-shadow 属性与动画一起执行。我编写了此代码,但只有 box-shadow 与动画一起运行。我希望我的动画执行,例如 this。如何解决这个问题?

    .popup {
        -webkit-transition: 1s;
        -moz-transition: 1s;
        -ms-transition: 1s;
        -o-transition: 1s;
        transition: 1s;
    }

    .popup:hover {
            top: -10px;
            -webkit-box-shadow: 0px 0px 50px 0px rgba(0, 0, 0, 0.15);
            -ms-box-shadow: 0px 0px 50px 0px rgba(0, 0, 0, 0.15);
            box-shadow: 0px 0px 50px 0px rgba(0, 0, 0, 0.15);
        }

【问题讨论】:

    标签: html css


    【解决方案1】:

    你能给我们'top'的初始值吗?

    如果您使用诸如 boostrap、semantic-ui 之类的框架, 添加(!重要)

    顶部:-10px 重要;

    【讨论】:

    猜你喜欢
    • 2012-05-16
    • 1970-01-01
    • 2016-06-14
    • 1970-01-01
    • 1970-01-01
    • 2023-04-08
    • 1970-01-01
    • 2013-10-25
    • 1970-01-01
    相关资源
    最近更新 更多