Last active
March 9, 2017 07:10
-
-
Save mathben/28fe9904a9c7e6a52a30f0fff5ac0ac6 to your computer and use it in GitHub Desktop.
Apply dark_filter to add foreground dark alpha with size of under element
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#dark_filter { | |
border: 1px solid #aaa; /*To show the boundaries of the element*/ | |
} | |
#dark_filter:before { | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
content: ''; | |
background: rgba(0,0,0, 0.5); /*partially transparent image*/ | |
pointer-events: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="manual"> | |
<div id="dark_filter"> | |
<button type="button" id="btn-ldr"> | |
<br/><br/><br/><br/> | |
<h1 style="background: rgba(0, 0, 0, 0.4);">Livre de règles</h1> | |
<div style="background: rgba(0, 0, 0, 0.7)">Règles, habilités et rituels.</div> | |
</button> | |
</div> | |
</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment