我正在尝试为a标签设置动画,它有一个 css 属性table-cell来获得我正在寻找的效果。当有人使用 jQuery 单击它时,我希望对其进行动画处理,但它不起作用,我认为这是因为table-cell删除table-cell会破坏布局。这是我正在使用的页面。
这是一个小提琴:http: //jsfiddle.net/nEryb/
.clip{
    background-color: #373938;
    min-height: 100%;
    height: 100%;
    width: 300px;
    background-position: center center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    display: table-cell;
    box-shadow: -2px 0 5px rgba(0,0,0,.2), -2px -2px 5px rgba(0,0,0,.2), -2px 2px 5px rgba(0,0,0,.2);
    text-align: center;
    filter: grayscale(100%);
    filter: url(/media/images/new/filters.svg#grayscale);
    filter: gray;
    -webkit-filter: grayscale(1);
    position: relative;
}
这是jQuery:
$(document).on("click", "a.clip", function(e){
    e.preventDefault();
    window.history.pushState("Gallery", "Gallery", $(this).attr("href"));
    $("a.clip.hover").animate({
        height: "20px"
    }, "fast");
});
我该怎么做才能让它发挥作用?