css transition from a tutorial not working even with -webkit- and -moz- prefixes -


this may have obvious answer, i'm not seeing it. updated code correct having wrong top value article section h1. added :hover trigger article section h1. otherwise, same code took webdesigner magazine demonstrate animated title effect, nothing happening in either ff or chrome. added -webkit- , -moz- prefixes transition style, still, nothing. please tell me i'm doing wrong.

    body,html {  	display:block;  	width: 100%;  	height: 100%;  	background: white;  	color:black;  	padding: 0;  	margin: 0;  	font-family: helvetica, sans-serif;  }  nav {  	position:fixed;  	top: 0;  	width: 100%;  	z-index: 9999;  	background: white;  }  article {  	position: relative;  	padding-top: 5em;  }  article section {  	position: absolute;  	opacity: 0;  	width: 100%;  }   article section:target {  	left: 0;  	opacity: 1;  	z-index: 9999;  }  article section h1 {  	position: absolute;  	top: 0em;  	left: 0;  	font-size: 4em;  	width: 100%;  	color:black;  	  }  article section h1:hover {  	text-shadow: 0 998em 2 em #000;  	transition: text-shadow 1.5s;  	-webkit-transition: text-shadow 1.5s;  	-moz-transition:text-shadow 1.5s;  }  nav {  	display:block;  	width: 100%;  	padding: 2em;  	text-align: center;  }  nav {  	color: black;  	text-decoration: none;  	padding: 1em 2em;  	margin-right: 1em;  }  nav > a:hover {  	border-bottom: .5em solid #c00;  }
 <nav>      		<a href="#first">option</a>      		<a href="#second">option</a>      		<a href="#third">option</a>      		      	</nav>      	      	<article>      		<section id="first">      			<h1>first title</h1>      		</section>      		<section id="second">      			<h1>second title</h1>      		</section>      		<section id="third">      			<h1>third title</h1>      		</section>      	</article>

fiddle

i don't know expected result is, anyway: have top: -1000em; in rule article section h1, , there no other rule change position. these h1 elements remain invisible (because far off screen). change top: 0em; beginning, , transitions...


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -