html - CSS Animation behind a menu and tag line -
i working on programming animation client. company name rise out behind line below or possibly image below. ultimate goal logo on this page without using flash.
i have animation have been working on here: http://inventivewebdesign.com/ndr/
my problem shows in front of naviagation menu , tagline below it. i'd go behind. have tried changing z-index doesn't work.
any ideas?
html:
<header id="masthead" class="site-header" role="banner"> <a class="home-link" href="http://inventivewebdesign.com/ndr/" title="ndr" rel="home"> <div id="title-animation" class="slideup"><h1 class="site-title">ndr</h1></div> </a> <h2 class="site-description">architecture • engineering</h2> <div id="navbar" class="navbar"> <nav id="site-navigation" class="navigation main-navigation" role="navigation"> <div class="nav-menu"><ul><li class="page_item page-item-2"><a href="http://inventivewebdesign.com/ndr/?page_id=2">sample page</a></li></ul></div> </nav><!-- #site-navigation --> </div><!-- #navbar --> </header><!-- #masthead -->
css:
.site-header .home-link { color: #141412; display: block; margin: 0 auto; max-width: 1080px; min-height: 90px; padding: 0 10px 0 60px; text-decoration: none; width: 100%; z-index: -1; } .site-header .site-description{ color: #141412; display: block; margin: 0 auto; max-width: 1080px; min-height: 20px; padding: 0 10px 20px; text-decoration: none; width: 100%; background-color: #ccc; z-index: 1; } .site-title { font-size: 60px; font-weight: bold; line-height: 1; margin: 0; padding: 10px 0 10px; z-index: -1; } /* animations */ #title-animation{ /*background-color: #fe5652;*/ visibility: hidden; } .slideup{ animation-name: slideup; -webkit-animation-name: slideup; animation-duration: 1.5s; -webkit-animation-duration: 1.5s; animation-timing-function: ease; -webkit-animation-timing-function: ease; visibility: visible !important; } @keyframes slideup { 0% {transform: translatey(100%);} 80% {transform: translatey(-4%);} 95% {transform: translatey(2%);} 100% {transform: translatey(0%);} } @-webkit-keyframes slideup { 0% {-webkit-transform: translatey(100%);} 80% {-webkit-transform: translatey(-4%);} 95% {-webkit-transform: translatey(2%);} 100% {-webkit-transform: translatey(0%);} }
z-index wont work if don't specify position.
adding
position:relative
, or
position:absolute
will sort out z-index straight away
so...
.site-header .home-link { position:relative; color: #141412; display: block; margin: 0 auto; max-width: 1080px; min-height: 90px; padding: 0 10px 0 60px; text-decoration: none; width: 100%; z-index: -1; } .site-header .site-description{ position:relative; color: #141412; display: block; margin: 0 auto; max-width: 1080px; min-height: 20px; padding: 0 10px 20px; text-decoration: none; width: 100%; background-color: #ccc; z-index: 1; } .site-title { position:relative; font-size: 60px; font-weight: bold; line-height: 1; margin: 0; padding: 10px 0 10px; z-index: -1; }
Comments
Post a Comment