Math.max (Document.body.scrollHeight, document.documentElement.scrollHeight);}3. Add code at the bottom of the HTML page:Copy the code code as follows:This triggers an alert ("Reach Bottom") when the scrollbar reaches the bottom of the page. The next thing to do is to change the triggered function to an AJAX call to d
much simpler, but I still think this can be extended, can be made into a plug-in form to invoke the content. In addition to the jquery animation mode is also more clear. The scroll of the picture is actually using to a setinterval (), defines this function, causes him to circulate unceasingly, thus forms the animation, certainly this does not compare those plug-ins to be good-looking, like the picture rolling transition time may add some blur effect
This article mainly introduces the principle and method of js to determine whether the scroll bar has reached the bottom or top of the page, and analyzes in detail various techniques involved in js's function of returning to the top of the page in the form of an instance, and summarized the relevant knowledge points. If you need a friend, you can refer to the example in this article to describe how js judges whether the
I found a lot on the Internet in response to this problem, finding the answer is rather messy. In fact, the Page object in ASP.net has a property that lets the page submit or update the data, and then return to the original location of the page, including the scroll bar position to save.
Copy Code code as follows:
inherits= "Default.default"%>
The
Before because of the company project needs, found on the Internet:
directly on the code.
HTML code
CSS Code
. inner{width:265px; height:400px; Position:absolute; top:33px; left:13px; /*cursor:pointer;*/Overflow:hidden; }. innerbox{overfl
);
}
3, add code at the bottom of the HTML page:
Copy Code code as follows:
This will trigger alert ("reach Bottom") when the scroll bar reaches the bottom of the page. The next thing to do is to change the triggered functionality to Ajax
jquery anchor Jump scroll bar Smooth scrolling One sentence code
Copy Code code as follows:
$ ("Html,body"). Animate ({scrolltop: $ ("#box"). Offset (). Top}, 1000;
Here are some of the little jquery tricks
1. Control the results of the compilation
Vue2.0 better-scroll sample code for moving terminals,
Preface:
In the previous article, the sliding effect was achieved. Let's try the implementation method of the left-right linkage effect.
Effect: When sliding to the right side, the left side can also be changed accordingly. When clicking on the left side, the right side can also be automatically located to the corresponding position.
As shown in, the le
discovered a touch developed by the Baidu cloud Clouda team. js (currently, this js is also maintained by this team). In this js environment, the swipe () method can be used, so we need to test it quickly. The result is OK! Thanks to the Baidu cloud Clouda team !!! Note that zepto itself does not have the animate () method. It encapsulates this method into a fx. js (go to the official website to download), so reference fx when using animate. js.
If you think this plug-in has bugs or deficiencie
I found a lot on the Internet in response to this problem, finding the answer is rather messy. In fact, the Page object in ASP.net has a property that lets the page submit or update the data, and then return to the original location of the page, including the scroll bar position to save.
Copy Code code as follows:
inherits= "Default.default"%>
The MaintainScr
Effect
Example 1
code is as follows
copy code
Example 2
The code is as follows
Copy Code
$ (function () {//gets the distance from the top of the browser to locate the elementvar NAVH = $ (". Nav"). Offset (). Top;//
I found a lot of questions on the Internet and found that the answers were messy. In fact, in Asp.net, the page object has a property that enables the page to submit or update data, and then return to the original page location, including the scroll bar location, which can be saved.
CopyCodeThe Code is as follows: Inherits = "Default. Default" %>
Set the maintainscrollpositiononpostback attribute to true
Modify index.template.html, add a section of JS to get the width of the browser window, according to the browser window width and height to modify the CSS style, html, body {height:100%; width:100%} Height and width are percentages or specific sizes, scroll bars appear when they are specific sizes and fill the entire window when they are percentages.
Specifically as follows:
1. Add the following JS source
Show hidden scroll bar under frameset frame
scrolling= "Auto" YES means to display reels
No means don't show the reels anyway
AUTO is subject to availability.
---------------------------------------------------------------------------------------
Hide scroll bar when CSS is loaded
or
---------------------------------------------------------------------------------------
div display up/down, left and rig
The standard scroll bar cannot be made by subclass. If you want to get a nice scroll bar, you need to draw it by yourself.
To add a scroll bar for clistctrl, the general idea is as follows:
(1) make the standard clistctrl scroll bar unavailable
(2) manually locate the H and V scr
Based on JS, the news list can seamlessly scroll up the instance code and js News list
When there are a lot of news and there is no limit at all, using scroll is a good choice. This chapter describes how to achieve this through code examples.
The code example is as follows:
Sometimes we can not put all the content in a page, we need to use the ScrollView, the extra content is scroll to get.First define the width and height, easy to fit the equipment.Let PageWidth = PageHeight = 800Then initialize a scrollview in the viewdidload:var ScrollView = Uiscrollview () scrollview.frame = Self.view.bounds scrollview.contentsize=cgsizemake ( CGFloat (PageWidth), CGFloat (pageheight)) scrollview.pagin
css| Web page When browsing the page, we can sometimes see the page scroll color is not the system default, but beautiful red or other colors, in fact, this is the page code to add code to achieve, what is the specific code?
The Web page scroll bar
When browsing the Web , we can sometimes see that some of the page scroll color is not the system default, but beautiful red or other colors, in fact, this is the code to add code between the Web page to achieve, what is the specific code?
The Web page scroll bar
This article mainly introduces the js scroll bar smooth moving sample code, which has some reference value, interested friends can refer to the examples in this article to share with you the js scroll bar smooth moving code for your reference. The details are as follows:
Html
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.