1.0.1 • Published 7 years ago

tfciw.css v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

tfciw.css

Just like jquery.css, set the property of HTMLElement or return the value of the property

If you use tfciw.css in your vue project just

npm i -S tfciw.css 

and

//main.js
import tfciw.css from 'tfciw.css'
Vue.prototype.$css = tfciw.css

webpack in vue will do the last work

how to use

let domObj = document.querySelector('div')
// domeObj can be Singular or Complex
// Set property
this.$css(domObj, {
  'background-color': 'red',
  'line-heght': '100px',
  'font-size': '20px'
})

this.$css(domObj, 'left', 0)

// Get the value of property
this.$css(domObj, 'color')