As I am new to transform
and -ms-transform
and -webkit-transform
, I can't make this code work as expected:
<nav>
<ul>
<li><a target="_parent" href="index.php" class="button">Home</a></li>
<li><a target="_parent" href="about.html" class="button">About</a></li>
<li><a target="_parent" href="login/reg.php" class="button">Register</a></li>
<li><a target="_parent" href="private/" class="button">Member</a></li>
<li><a target="_parent" href="chat.php" class="button">Chat</a></li>
<li><a target="_parent" href="http://yo.hostei.com" class="button">URL Shortener</a></li>
<li><a target="_parent" href="http://sql17.000webhost.com/phpMyAdmin/index.php?db=a7593238_data" class="button">Admin</a></li>
</ul>
</nav>
<style>
nav {
text-align:center;
width:100%;
}
ul li {
list-style:none;
text-align:center;
display:inline-block;
}
.button {
text-decoration:none;
color:#000000;
padding:10px 20px;
text-align:center;
}
.button:hover {
-ms-transform:translateY(10px);
-webkit-transform:translateY(10px);
transform:translateY(10px);
background-color:#cccccc;
}
</style>
So when I move the mouse over it, the <a class="button">
element should transform itself down 10 pixels.
What's the problem here?