CSS Attention Small Dot

Source: Internet
Author: User

Jq

1, prepend (parameter);//The parameter content is placed in front of an element inside;

eg

<div id= "Div1" > Magical Ability Song </div>

$ ("#div1"). Prepend ("<a href= ' # ' > Chen Tablets </a>");

Results: <div id= "Div1" ><a href= ' # ' > Chen granule </a> marvelous Song </div>

2.

Outerheight (Boolean)

Outerheight (false);//calculation of the margin value of an element padding and border

Outerheight (TRUE);//The margin value of the calculated element

3. Delay (time);

eg:$ ("#div1"). Delay () show ();//The element delays 300ms and performs the display;

4. Set scroll bar dynamic sliding

$ (document). ScrollTop ();//scroll bar height

$ ("body"). Animate ({scrolltop:500px},500);

5. Open a new window

window.open ("url");

6. Binding multiple events with the same class name, using the Ligatures method

eg

$ ("#focus"). KeyDown (function () {

Xx

}). focus (function () {

Xxx

});

7, Sprite background map

. Icon Icon-1
<span class= "icon icon-1" ></span>
. Icon{background:url (') no-repeate;}
. icon-1{background-position:-24px-100px;}
The background graph does not show that
Solve:
. Icon{background-image:url ('); background-repeate:no-repeate;}
. icon-1{background-position:-24px-100px;}

8, the interface

If <div><a></a><a></a></div>
The A tag has an IMG tag with an img height of 88, but in fact the div has a height of 92, "Forest Blank Node"
Workaround: Add Vertical-align:middle to the IMG tag, or img{display:block;} a{font-size:0;}

Compatibility:

IE7: to make overflow:hidden; effective, it needs to add position:relative to its parent element;

CSS Attention Small Dot

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.