Transition Effect on Hover 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>Transition Effect on Hover 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 Transition Effect on Hover Pagination Style
.pagination{
display: inline-block;
}
.pagination a{
color: #000;
float: left;
padding: 8px 16px;
text-decoration: none;
transition:background-color.3s ;
}
.active{
background-color: green;
color:#fff;
}
.pagination:not(.active):hover{
background-color: #ddd;
color: #000;
}
No comments:
Post a Comment