Read about jquery smooth div scroll example, The latest news, videos, and discussion topics about jquery smooth div scroll example from alibabacloud.com
In our daily development work, many pages need to scroll bar function, he more convenient to use the user to the Site page experience, then in the DIV scroll bar style There are many kinds of, then we will introduce you to the CSS set div scroll bar Style
The example in this article describes the method of implementing the jquery control div to scroll with the scroll bar. Share to everyone for your reference, specific as follows:
More interested readers of jquery-related
This article describes a method written by jquery to judge the bottom of a div scroll bar. Colleagues will introduce scrollTop, scrollLeft, and scrollHeight attributes in javascript to the coders, for more information, see. There are many concepts related to the scroll bar in jQuer
First consider the outer setting of a container div,id set to #container, so that his height is the height of the browser window, and then the #footer Div is set to the #container of the child Div, and use the absolute positioning of the way, so that he fixed to the bottom of the #container, To achieve the desired div
This article describes a method written by jquery to judge the bottom of a div scroll bar. colleagues will introduce scrollTop, scrollLeft, and scrollHeight attributes in javascript to the coders, for more information, see. There are many concepts related to the scroll bar in jQuer
Simple idea: Use the scroll bars of the DIV and DIV to control the scrolling of the content. the scroll bar style of the DIV can be overwritten by the DIV layer. Rewrite the scroll bar
The scroll bar of the DIV and DIV controls the scrolling of the content. the scroll bar style of the DIV can be covered by the DIV layer. Rewrite the scroll bar style
I checked some div effects to implement the scroll bar. I read a lot and most of them do not meet the requirements.
The requirements are as follows:
1. Fixed div size, but not fixed content size in div
2. When you move the mouse over the content, if the content is too large, a scro
This article describes the jquery implementation method that scrolls the scroll bar in a div to a specified location. Share to everyone for your reference, specific as follows:
One, JS code:
onload = function () {
//initialization of
scrolltolocation ();
function Scrolltolocation () {
var Maincontainer = $ (' #thisMainPanel '),
Scrolltocontainer
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;//scroll bar Event$ (window). Scr
Example of jQuery effect for smooth downloading of anches
Effect:
Implementation principle:
Use jQuery animate () to implement smooth Page scrolling.
$('html, body').animate({scrollTop: $(hash).offset().top}, 800, function(){window.location.hash = hash;});
Simple instance
jquery calculates the length and position of the scroll bar, as follows:
Javascript
Copy Code code as follows:
Scrolling area Content div:Html
Copy Code code as follows:
Total operating income: 1.166 billion yuan (year-on-year growth-1.75%)
Earnings per share: 0.04 RMB
NET assets Yield: 1.58%
Gross Profit margin: 12.22% (growth 39.89%)
Total assets: 3.046 billion yuan (up -7.1
You have seen the scroll bar. In this article, we will use div to simulate the effect of the scroll bar. The specific implementation is as follows. If you are interested, refer
The Code is as follows:
This article mainly introduces jquery decision Div with the scroll bar scroll to a certain position after the Stop method, the need for friends can refer to the following Implementation code: nbsp; Code as follows: ; nbsp; Method Description: Subtracting the height of the scroll
Simple idea: Use the scroll bars of the DIV and DIV to control the scrolling of the content. the scroll bar style of the DIV can be overwritten by the DIV layer.JQuery calculates the length and position of a
The following small make up will bring you a DIV rolling with the scroll bar to implement the Code [recommended ]. I think it is quite good. Now I will share it with you and give you a reference. Let's take a look at the small editor. I remember it was troublesome to write such code before. Now JQuery is much simpler, just a few lines of code!
css| Standard | example | scroll bar
Scroll bars automatically appear when the window shrinks beyond the width of the layer ...
Here's the code:#menu {Float:left;width:25%;Background-color: #ff99CC;Overflow:auto;}2 Column Layout grid. The navigation column and content column are dynamic and adjust themselves to the browser window.This layout also wor
The following small make up will bring you a DIV rolling with the scroll bar to implement the Code [recommended ]. I think it is quite good. Now I will share it with you and give you a reference. Let's take a look at the small editor. I remember it was troublesome to write such code before. Now JQuery is much simpler, just a few lines of code!
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.