<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
<style>
ul.navbar {
background-color: #f1f1f1;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
}
ul.navbar li {
float: left;
}
ul.navbar li a {
display: block;
color: black;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
ul.navbar li a:hover {
animation: rotate 1s infinite;
}
</style>
</head>
<body>
<ul class="navbar">
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</body>
</html>
本文为翻滚的胖子原创文章,转载无需和我联系,但请注明来自猿教程iskeys.com