above (Zhihu effect)
give me json backstage
{
"newe_page":1, //
"page_count":52, //
}
to find out how to achieve the effect shown above, answer
above (Zhihu effect)
give me json backstage
{
"newe_page":1, //
"page_count":52, //
}
to find out how to achieve the effect shown above, answer
if you know the total number of pages, you can draw all the pages. 1, 2, 3, 4, 5, 5, 5, 6, 6, and n, and you can also know whether you need to add an ellipsis. For example, if the rule of Zhihu is that the total number is greater than 5, you can add it.
once the current number of pages is known, you can decide which number turns gray, and you can also know whether to add "previous / next page";
once the total number of pages and the current number of pages are known, you can know where to add ellipses.
at this point, all the requirements have been implemented.
the paging component is so mature that I don't feel the need to reinvent the wheel.
Previous: Add or remove indexes for online data tables
Next: PHP canonical results are inconsistent under windows and linux?
draw the subway map to achieve the drag function, the first drag is normal, the back drag will appear a backward effect in the opposite direction. function clickSubway(e) { isDrag=true; start_x=e.pageX-draw.offsetLeft; start_y=e.pageY-draw....
The end result of vue implementation is to refresh the page and chat records of two people I would like to ask all the great gods to give us a train of thought in one or two. ...
problem 1: now the company is developing an activity that uses the H 5 interface to do it. Click on the pop-up window on the native app and enter my H5 interface. pass a user ID, ask me how my current H5 interface should receive the parameters passed ...
the code is as follows: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equ...
I implement preview pdf in web. As long as the href to the file link browser will preview automatically, but I add the download attribute under the a tag or just preview but not download. How to solve this? ...
chrome browser, in mobile phone mode iphone6, adds this sentence to the page < meta name= "viewport " content= "width=device-width, initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5 " > . At this time, both window.innerWidth and document.docume...
using app packaged with Hbuilder to use sharing function, Android real machine debugging and apk testing are all fine ios can be debugged on a real machine, but after the packaged ipa files are installed, the sharing function is not available have y...
What s the difference between and a direct request request ...
my web page needs to load a 3.3Mb library resource with the suffix .sf2 because I want to play music. when you enter the page, the chrome debugging tool shows that it takes 20s to load this resource, and I think the speed is more than 100kb s. I am us...
has an address. How can a html, be returned to prevent js execution in the returned html? ...
...
because the mobile project we are doing now will eventually be enclosed in the app shell. I put the axios request of each component in the created. Go to the component to send the request and get the data . the requirement now is that all component...
how does the front-end page get the videos and pictures in the database? Without relevant experience, you had better say more details about _ (: 3 ") _ like a video bar how to get it. On your knees. Thank you. Thank you, guys. I was wrong that TT ...
1: after the page login is redirected, the user switches routes, how to ensure that he does not have to log in every time? 2: the user enters a routing link at will for the first time, how to judge that he has not logged in yet, and needs to log in. ...
does the ngx-ueditor rich text editor support angular4.x ...
play video local video normal playback request server video to report 403 but open normally in the browser to solve! Wait online <template> <div class="player"> <video-player class="vjs-custom-skin&quo...
can variables be written in legend.selected in echarts? Why are the variables I wrote treated as strings? console.log(aa); optionFH.legend.selected={ aa:true, "xx":true, ...
use js to get uploaded files. When judging the file type, there are computers whose uploaded word, cannot get the file type, through js, but pdf can get the file. is obtained by using the event.files [0] .type method, and basically most computers ca...
from page a hyperlink to page b, I want to press back to page a no matter how many times I refresh and submit on page b. How can I achieve this? if replaceState can be implemented, please also show me how to fill in the third parameter ...
if I have four methods of abcd. Each of these methods is executed for five seconds, and the sequence is random. Is there a way to do this? ...