简体   繁体   English

如何使CSS动画在页脚下呈现?

[英]How to make CSS Animations render underneath a footer?

I currently have a footer on my website which is created with the following HTML: 我目前在我的网站上有一个用以下HTML创建的页脚:

<footer>
      <div class="container">
          <div style="float: left;"> www.redbarongames.co.uk </div>
          <div style="float: right;"> <i class="fa fa-copyright" aria-hidden="true"></i> 2016-2017 Redbaron Games. Designed by Conor Watson </div>
      </div>
 </footer>

And the following CSS: 以及以下CSS:

footer {
    width: 100%;
    height: 100px;
    background-color: #efefef;
    font-family: 'BebasNeue', sans-serif;
    color: #606060;
    padding-top: 45px;
    -webkit-box-shadow: 0px -5px 5px 0px rgba(0,0,0,0.75);
    -moz-box-shadow: 0px -5px 5px 0px rgba(0,0,0,0.75);
    box-shadow: 0px -5px 5px 0px rgba(0,0,0,0.75);
}

I also have a large div which is at the bottom of my page, right above the footer. 我在页面底部的页脚正上方还有一个大div。 I wanted this div to fade in from underneath the footer, so I tried using the Animate.CSS 'fadeInUp' animation, however the animation plays over the top of the footer (like so: https://gyazo.com/00c16528ee1a797284cb595235dc2d56 ). 我希望该div从页脚下方淡入,因此我尝试使用Animate.CSS'fadeInUp'动画,但是该动画在页脚的顶部播放(例如: https ://gyazo.com/00c16528ee1a797284cb595235dc2d56)。 How can I make the animation play below the footer? 如何使动画在页脚下方播放?

Try to add a z-index to your <footer> - z-index: 9999 尝试向您的<footer>添加一个z-index - z-index: 9999

footer {
    z-index: 9999;
    width: 100%;
    height: 100px;
    background-color: #efefef;
    font-family: 'BebasNeue', sans-serif;
    color: #606060;
    padding-top: 45px;
    -webkit-box-shadow: 0px -5px 5px 0px rgba(0,0,0,0.75);
    -moz-box-shadow: 0px -5px 5px 0px rgba(0,0,0,0.75);
    box-shadow: 0px -5px 5px 0px rgba(0,0,0,0.75);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM