How to obtain non-interline style using variable parameter css function

小云云
Release: 2018-03-14 16:48:58
Original
1321 people have browsed it

This article mainly shares with you the method of obtaining non-interline style with variable parameter css function. I hope it can help you.

1. Variable parameters

   可变参数 
Copy after login

2. CSS function

   css函数  

Copy after login

3. Obtain non-interline style
When using window.onload(), it cannot be nested inside Other functions, but can call other functions.
There are two ways to obtain non-interline styles.
The first is: the usage method of currentStyle is the same as style, but it is only compatible with IE.
The second is: getComputedStyle, the usage method is getComputedStyle(op, false).width; where the first parameter is the name of the object to be obtained , the second parameter is an arbitrary value.
When getting interline styles, you cannot use getComputedStyle to get compound styles, such as background, but if you want to get the background color, you can use backgroundcolor

   获取非行间样式   

Copy after login

Related recommendations:

How to get non-interline style? Using js and jquery to obtain non-interline styles

JS to obtain non-interline styles and compatibility issues_html/css_WEB-ITnose

About css non-interline How to use style, solve ~_html/css_WEB-ITnose

The above is the detailed content of How to obtain non-interline style using variable parameter css function. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!