Skip to content

Set both the Alpha Transparency of Text, Backgrounds and border maintaining cascading effect of css

License

Notifications You must be signed in to change notification settings

webciter/setAlpha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Set both the Alpha Transparency of Text, Backgrounds and border maintaining cascading effect of css

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published