Paging code for this effect. Solution

Source: Internet
Author: User
Paging code for this effect. This effect .. ------ Solution -------------------- the image is suspended! Seeking truth! ------ Solution ------------------ previous page max (1, $ page-1); Next page min ($ max_page, $ page + 1); Middle for ($ imax (1, $ page-5), $ nmin ($ the paging code for this effect.
This effect ..



------ Solution --------------------
The picture is down! Seeking truth!
------ Solution --------------------

Front page = max (1, $ page-1 );
Back page = min ($ max_page, $ page + 1 );
Intermediate
For ($ I = max (1, $ page-5), $ n = min ($ max_page, $ page + 5); $ I <= $ n; $ I ++)


------ Solution --------------------
Is it css? Isn't it similar to others?
------ Solution --------------------
It's also related to the database you are using. if it's just paging, it's okay. like there are pages in your database, it's hard to estimate the algorithm.
------ Solution --------------------
First write it out with css and then set it to php.
------ Solution --------------------
The key to implementing this paging method is that CSS styles cannot achieve results, and technologies have been implemented.
------ Solution --------------------
Yes. Let's take a look at jquery, which has powerful functions.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.