【文件属性】:
文件名称:dom.style:跨浏览器风格操作
文件大小:17KB
文件格式:ZIP
更新时间:2021-06-05 12:22:36
JavaScript
跨浏览器 css 操作。
用法
var style = require ( 'style' )
, el = document . getElementById ( 'myEl' )
, bgColor = style . getStyle ( el , 'background-color' ) // => '#ffffff'
, left = style . getNumericStyle ( el , 'left' ) // => [75, 'px']
, rotation = style . getStyle ( el , 'rotate' ) ; // => '45deg'
style . setStyle ( el , 'left' , 80 ) ;
style . setStyle ( el , 'translateX' , 10 ) ;
style . cl
【文件预览】:
dom.style-master
----.gitignore(27B)
----README.md(4KB)
----test()
--------style-test.js(20KB)
--------fixtures()
--------style.js(22KB)
--------sauce.js(2KB)
--------test-runner.html(629B)
----package.json(977B)
----index.js(16KB)
----.npmignore(21B)