HTML DOM and CSS control method _dom

Source: Internet
Author: User
Most of our use of CSS uses a link tag in the Web page to introduce a CSS file. or define CSS styles within the head tag in a Web page. Dom actually provides a number of instructions. You can dynamically set or get the CSS skin style of an element. You may have seen the "skin-changing" feature on other sites. The technique uses DOM directives to introduce a new CSS file for the current Web page. Change the appearance of your Web page abruptly. Of course, you can also only set the appearance of an element in the current page. Use properly can improve the user experience to a great extent! Let me just enumerate the instructions for CSS in DOM. Limited to space, I do not provide the use of the various DOM instructions in the page and the example demo, you can click on the relevant DOM directive name. To learn more about the instructions and the example demo.

Use the DOM's classname to specify the name of a CSS style class for the current element. To change the appearance style of the current element
To set multiple CSS property styles for the current element in the HTML DOM: Csstext
The HTML Dom gets the instruction of the CSS property value specified by the current element: Currentstyle support IE
The HTML Dom gets the instruction of the CSS property value specified by the current element: GetPropertyValue support FF
An createstylesheet directive is also provided in the HTML DOM. Dynamic Web pages can be introduced into a new CSS file. The "Skin change" function I mentioned earlier. Unfortunately this directive does not support FF and Chrome browsers, but I have already solved the same effect under FF in createStyleSheet's tutorial.
Under the leadership of Ajax technology. DOM has developed rapidly in recent years. is also valued by many people. Many big websites are trying to pursue a good user experience. These technologies have become no stranger! In fact, these are the scope of the front-end design, now like "Baidu", "Taobao", "Teng Xun" and so on these large companies are quite attached to the front-end design. So learning good front-end is also a good choice, I hope that today can help you to speak!

Author: Kang Dong from: Www.Web666.Net
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.