Most websites are composed of multiple pages, and rarely are composed of a single page. So many pages require the paging function. This article will introduce to you the specific implementation of css paging settings and css paging code.
1. A specific example of a simple css paging code is as follows:
The effect is as follows:
2. CSS paging effect--click and mouseover paging style specific code examples are as follows:
style style code:
ul.pagination { display: inline-block; padding: 0; margin: 0; } ul.pagination li {display: inline;} ul.pagination li a { color: black; float: left; padding: 8px 16px; text-decoration: none; } ul.pagination li a.active { background-color: #4CAF50; color: white; } ul.pagination li a:hover:not(.active) {background-color: #ddd;}
The effect is as follows:
Note: If you click on the current page, you can use .active to set the style of the current page, and when you hover the mouse, you can use the :hover selector to modify the style.
:Hover is a special style added when the mouse moves over the link. Can be used on all elements, not just links.
:link selector sets the style of links to unvisited pages
:visited selector sets the style of links to visited pages: active selector sets the style when you click the link style.
3. CSS paging style - rounded corner style
The main difference in the code here is related to the border-radius attribute.
ul.pagination li a { border-radius: 5px; } ul.pagination li a.active { border-radius: 5px; }
The effect is as shown below:
Note: The
border-radius attribute is an abbreviated attribute used to set four border- *-radius attribute. This property allows you to add rounded borders to elements!
This article introduces three situations about css paging style for your reference. I hope it will be helpful to friends in need!
The above is the detailed content of How to use css to display different paging effects at the bottom of the page? (various style examples). For more information, please follow other related articles on the PHP Chinese website!