【文件属性】:
文件名称:sheetjs:创建和操作CSSStyleDeclarations
文件大小:354KB
文件格式:ZIP
更新时间:2021-05-01 06:09:43
JavaScript
SheetJS
使用javascript轻松创建和操作CSSStyleDeclarations :
import { StyleSheet } from 'sheetjs' ;
// or
const { StyleSheet } = window . sheetjs ;
const styleSheet = new StyleSheet ( ) ;
const s = styleSheet . stylesForSelector ;
// changes background color for all current and future matching elements
s ( '#content .my-selector' ) . backgroundColor = 'green' ;
当您需要动态样式的元素数量众多时,这非常有用。
jQuery .css()与SheetJ
【文件预览】:
sheetjs-master
----.travis.yml(36B)
----.eslintrc(4KB)
----.babelrc(43B)
----package.json(2KB)
----test()
--------test.js(2KB)
--------test.html(553B)
--------mocha.opts(29B)
--------test.compiled.js(735KB)
----webpack.test.config.js(361B)
----webpack.demo.config.js(392B)
----Readme.md(3KB)
----dist()
--------sheetjs.min.js(13KB)
--------StyleSheet.js(32KB)
--------StyleSheet.min.js(12KB)
--------sheetjs.js(32KB)
----StyleSheet.js(47B)
----src()
--------StyleSheet.js(4KB)
--------utils()
--------sheetjs.js(71B)
----.gitignore(28B)
----webpack.config.js(559B)
----demo()
--------index.html(125B)
--------dist()
--------src()
----.eslintignore(77B)