CSS skills [arrangement]

Source: Internet
Author: User

CSS fixed the table header (the header remains unchanged when the scroll bar is pulled down)

. Headlock

{

Top:Expression (this. offsetparent. scrolltop );

Position:Relative;

}

CSS fixed the left column of the table (a column remains unchanged when the scroll bar is pulled to the right)

. Leftlock

{

Left:Expression (this. offsetparent. scrollleft );

Position:Relative;

}

//When the applicationCSSAdd the corresponding element.

You can dynamically add hierarchical links.Offsetparent

For example:

This. offsetparent. offsetparent. scrollleft

This. offsetparent. scrollleft

Add JS events to CSS

TD

{

Background-color: # Ffffff;

Onmouseover:Expression (onmouseover = function () {This. style. bordercolor = 'blue'; this. style. Color = 'red'; this. style. backgroundcolor = 'yellow '});

Onmouseout:Expression (onmouseout = function () {This. style. bordercolor = ''; this. style. Color =''; this. style. backgroundcolor = ''});

}

When the CSS control text exceeds the range, the ellipsis is displayed.

Div{

Text-Overflow:Ellipsis;

Width:200px;

White-space:Nowrap;

Overflow:Hidden;

}

Div is beyond the range of 200px. If white-space : nowrap has no effect if it is not added, because it will automatically wrap the line; overflow : hidden cannot hide or hide more than one part without adding it. text-overflow : ellipsis indicates whether to display the ellipsis ( text-overflow : clip is not displayed. Div

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.