【发布时间】:2018-11-21 09:04:10
【问题描述】:
我正在使用卡片作为新闻块。
悬停卡片时,会从下到上(滑动)显示叠加层
在 IE 中查看时,在 Firefox 和 Chrome 浏览器上一切正常,动画呈现非常糟糕,也没有滑动动画
谁能指导我,我会在这里附上我的代码。
欢迎任何改进、建议或替代解决方案。
ps:我目前使用的是 Microsoft Edge 42.17134.1.0
.card_container{
position:relative;
width:280px;
margin:auto;
background:rgba(0,0,0,0.2);
height:450px; overflow:hidden;
}
.card_text{
position:absolute;
color:#fff;
height:100%;
width:100%;
top:0;
left:0;
}
.card_text .pre_state {
position:absolute;
top:calc(100% - 30%);
width:100%;
padding:30px 15px 25px;
height:100%;
transform:translate(0%, -30px);
}
.card_text h5{
font:14px/25px 'Graphik-Regular';
padding-bottom:10px;
}
.card_text h2{
font:20px/22px 'Graphik-Medium';
}
.card_text a.hidn{
position:absolute;
bottom:15%;
font:14px/22px 'Graphik-Medium';
color:#fff;
display:none;
}
.card_container:hover .card_text .pre_state{
top:0;
background-color:rgba(51,154,205,0.7);
transition:all .5s ease-out, all 0.5s ease-in;
transform:none;
}
.card_container:hover .card_text a.hidn{
display:block;
}
<div class="card_container">
<div class="card_text">
<div class="pre_state">
<h5>20 Oktober 2018</h5>
<h2>Vestibulum facilisis, tortor atrutrum cursus.</h2>
<a href="#" class="hidn">Read more > </a>
</div>
</div>
</div>
【问题讨论】:
-
看起来
calc仅在 IE 9 中得到部分支持 - caniuse.com/#search=calc -
@Mohammad 没有解决我的问题
-
IE 9 不支持
transition,正如您在caniuse.com/#feat=css-transitions 中看到的那样 -
我不知道它的Microsoft Edge 42.17134.1.0是什么版本的IE
-
首先你说我目前使用的是IE 9
标签: javascript html css microsoft-edge