获取元素的css属性内容
- Source:
Parameters:
Name | Type | Description |
---|---|---|
el |
HTMLElement
|
dom元素 |
cssProp |
String
|
css的属性名称 |
Returns:
- Type:
-
String
css对应的属性的值
Example
computedStyle(document.body, 'width')
- Source:
Parameters:
Name | Type | Description |
---|---|---|
str |
String
|
拷贝的内容 |
Example
copyToClipboard('hello world')
- Source:
Parameters:
Name | Type | Description |
---|---|---|
el |
String
|
元素 |
Example
getScrollPosition() // {x: 3, y: 6023}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
el |
HTMLElement
|
dom元素 |
className |
String
|
class名称 |
Example
hasClass(document.body, 'temp-class')
- Source:
Parameters:
Name | Type | Description |
---|---|---|
url |
String
|
link的地址 |
config |
Object
|
link属性配置 |
Returns:
- Type:
-
Promise
- Source:
Parameters:
Name | Type | Description |
---|---|---|
el |
HTMLElement
|
dom元素 |
className |
String
|
Array.<string>
|
class名称 |
Example
addClass(document.body, 'temp-class')
- Source:
Parameters:
Name | Type | Description |
---|---|---|
opacity |
Number
|
透明度 0~1之间 |
Returns:
- Type:
-
String
rgba色值
- Source:
Parameters:
Name | Type | Description |
---|---|---|
el |
HTMLElement
|
dom元素 |
className |
String
|
Array
|
class名称,可以是多个 |
- Source:
Parameters:
Name | Type | Description |
---|---|---|
url |
String
|
script 的地址 |
config |
Object
|
script配置 |
Returns:
- Type:
-
Promise
onload的 e