在预订并找到这篇文章后:@Keyframes don't move my div
基于这篇文章,我试图弄清楚这个问题,我仍然不能弄清楚为什么我的关键帧就是拒绝移动我的div块。我对html和css仍然是个新手。
代码中的图像应该是徽标,但我现在只是随机插入一个图像作为占位符。
任何帮助都将不胜感激。非常感谢!
@keyframes move {
0% { top: 0%; opacity: 0;}
100% { top: 50%; opacity: 1;}
}
a#btn_niche {
margin: auto;
font-family: 'Bitter', serif;
text-decoration: none;
text-align: center;
color: #5A3E2E;
position: absolute;
display: block;
letter-spacing: 0.07em;
font-size: 2.1em;
}
.niche_logo {
margin: auto;
}
.logoblock:hover {
animation: mymove 3s ease-out forwards;
animation-fill-mode: forwards;
}<!DOCTYPE html>
<html>
<body>
<div class="button_container">
<a href="http://www.uncommonobjects.com/" target="_blank" id="btn_niche"><div class="logoblock"><img class="niche_logo" src="https://cbsstlouis.files.wordpress.com/2011/01/niche_taste_exterior.jpg" width=7%></div> niche</a>
</div>
</body>
</html>
https://stackoverflow.com/questions/44467808
复制相似问题