element-functions-set_alpha

1.0.0 • Public • Published

setAlpha

Set both the Alpha Transparency of Text and Backgrounds maintaining inheritance overrides

var element = document.getElementById("test");
element.style.backgroundColor = "#000"; /* you need to set the background color first*/
element.setBackgroundAlpha(50); /* 50% transparency */

You can set all backgrounds and text to a default color by a rule like this

*{
background-color: #FFF;
color: #000;
}

Any element nested can also be change to it's own alpha transparency which was not possible with opacity css rule

Readme

Keywords

Package Sidebar

Install

npm i element-functions-set_alpha

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

4.16 kB

Total Files

4

Last publish

Collaborators

  • webciter