[Timlinux] JavaScript element Dynamic Display

Source: Internet
Author: User

1. Opacity Properties of CSS

This property is used to: set the opacity level of the element, the range of values: from 0.0 (fully transparent) to 1.0 (completely opaque), the text stream where the element resides. The dynamic change of this property can be used to set the fade effect of the element.

2. JavaScript usage

The Opacity property value of the element is periodically modified by the SetInterval function, and the SetInterval function is clearinterval after the final setting is complete.

var alpha = + ; var speed = Ten= setinterval (function() {    if(alpha = = ITarget) {        clearinterval (timer);            } Else {        + = Speed ;         = "Alpha (opacity=" +alpha+ ")"; // IE        oDiv.style.opacity = alpha/100;//ff,chrome        30);

[Timlinux] JavaScript element Dynamic Display

Related Article

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.