New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

css-style.js

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-style.js

modify the element style fast and safety and auto prefixes.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

style.js

modify the element style fast and safety and auto prefixes.just 2kb

安全简单快速修改元素的style~只有2kb哦

usega

npm install style.js

style(selecors,css)

CDM

var style = require('style')

AMD

define(['style'],function(style){})

ES6

import style from 'style'

Example

var qs = function(q){return document.querySelector(q)}

// elements string style
style('.box','width:200px;height:200px;background:red')
// 
style('.box',{float:'left',margin:'15px'})
for(var a = 1; a <= 4 ; a ++){
    style('.box'+a,{animation:'pulse 0.6s '+ (a-1) + 's'})
}
//1
style(qs('.box1'),{background:'blue',filter:'blur(5px)'})

//2
style('.box2',{background:'purple'})

style(['.box3','.box4'],{background:'#673ab7',border:'5px solid #4caf50'})

style(['.box3',qs('.box4')],{boxShadow:'5px 5px 8px #FF9800'})

License

style.js is licensed under The MIT License.

Keywords

css

FAQs

Package last updated on 14 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts