html - 页面打开时缩放和淡入淡出

标签 html css jquery-animate scale transition

第一期: 我一直在努力做到这一点,但没有任何效果。就像加载页面一样,我想要一个图像缩放和淡化并坐在那里。图片也是一个链接。

到目前为止我没有任何动画的代码是

html---

<a href="index.html"> 
    <img src="images/insandoutslogo.jpg" alt="" class="insandoutslogoimg" /> 
    <p1> Ins and Outs </p1>
</a>

CSS---

.insandoutslogoimg
{
    width: 210px;
    height: 210px;
    position: fixed;
    top: 50%;
    left: 50%;
    margin-top: -112.5px;
    margin-left: -112.5px;
}

谢谢堆!

最佳答案

这个问题很难理解。但也许你正在寻找这样的东西:

.insandoutslogoimg {
  width: 210px;
  height: 210px;
  position: fixed;
  top: 50%;
  left: 50%;
  margin-top: -112.5px;
  margin-left: -112.5px;

  animation: fadeInDown 2s ease;
}

@keyframes fadeInDown {

  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

CodePen demo

您还需要 browser prefixes (CodePen 使用 Lea Verou -prefix-free )

关于html - 页面打开时缩放和淡入淡出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18799722/

相关文章:

html - 停止折叠位置为 :fixed 的 div

javascript - 单个 HTML 中的多个页面,页面之间具有连续性

html - 虚幻引擎 4 如何将我的游戏发布到网站?

html - 悬卡在相对父级上方的位置跨度

html - CSS :hover not working after applying both :before and :after on the same element

jquery - 使用 jQuery 更改页面滚动上的导航事件类

Jquery 1.4 : Two functions not working together on same page

javascript - angularJs 动画 ng-repeat 入口

javascript - FadeIn 和 FadeOut 跳转页面

html - 如何使网站标题响应?