Active and Hoverable Pagination
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="STYLESHEET"type="text/css"href="web.css">
<title>web design</title>
</head>
<body>
<h1>Active and hoverable Pagination</h1>
<p>Move the mouse over the numbers.
</p>
<div class="pagination">
<a href="#">«</a>
<a href="#">1</a>
<a href="#" class="active">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<a href="#">6</a>
<a href="#">7</a>
<a href="#">»</a>
</div>
</body>
</html>
CSS Active and Hoverable Pagination Style
.pagination{
display: inline-block;
}
.pagination a{
color: #000;
float: left;
padding:8px 16px;
text-decoration: none;
}
.active{
background-color:green;
color: #fff;
}
.pagination a:hover:not(.active){
background-color: #ddd;
color: #000;
}
No comments:
Post a Comment