We all know that JavaScript is used to manipulate css attributes. style is usually used directly for css attributes that are not underlined. the property name, for example, obj. style. margin, obj. style. width, obj. style. left, obj. style. position. For css attributes that contain dashes, remove each dashes and replace the first character after each dashes with uppercase letters. For example, obj. style. marginTop, obj. style. borderLeftWidth, obj. style. zIndex, obj. style. fontFamily, etc. However, css has a special attribute, and its js usage is special. This special attribute is the float attribute.
If you follow the regular syntax, obj. style. float is incorrect. It will not take effect in any browser. Then how should we use js to write this attribute.
The correct usage method is as follows:
In ie:
Obj. style. styleFloat
Other browsers:
Obj.style.css Float
Articles you may be interested in
- Three solutions for ineffective page refresh caused by Js, css, and images cached on webpages
- Functions related to cookie operations in JavaScript
- How to Use jquery. lazyload to dynamically delay page image loading
- Php and mysql uft-8 Chinese encoding garbled several solutions
- Div css book tutorials recommend "professional CSS + DIV webpage style and layout video tutorials"
- Differences in the usage of tinyint, smallint, int, and bigint types in mysql
- Edit the jQuery select drop-down box (add, delete, modify)
- Solution to the DedeTag Engine Create File False error in dedeCMS