1. Transparency:
If a background color or a background image is not specified for a text, then the background of this element is usually transparent.
This is very important. If an absolutely positioned element with text is placed on top of an element with text, it will be very confusing. Then we can cover it by setting a background image or background color. , if necessary, we can set its display to "transparent" (transparent)
The general css for setting transparent elements is as follows:
opacity:.75;//ff new
-moz-opacity:.75;// transparency for older Mozillas
filter :Alpha(opacity=75);//for IE
2. CSS with hyphens:
Camel style naming:
element.style.fontFamily = "sans-serif";
element.style. borderLeftWidth = "5px";
element.style.zIndex = 100;
3. Things to note:
var padding_left = 50;
element.style.left = padding_left "px";//Don’t forget to add Unit
var topMargin = 10,rigntMargin = 11,bottomMargin = 12,leftMargin = 13;
element.style.margin = topMargin "px" rigntMargin "px" bottomMargin "px" leftMargin "px";
4. Set float
element.style.cssFloat = "left";//firefox chrome opera
element.style.styleFloat = "left";//IE
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn