ImageGrid/legacy/ui/experiments/css-overlay.html
Alex A. Naanou 5f47d6da7b restructured the repo moving the legacy out of the way...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2020-08-28 17:32:02 +03:00

48 lines
753 B
HTML
Executable File

<style>
.image, .overlay:after, .elem-overlay {
width: 350px;
height: 350px;
}
.image {
position: absolute;
top: 50px;
left: 50px;
background: no-repeat 50% black;
background-size: contain;
background-image: url('../images/350px/DSC_3506.jpg');
/* this sets the opacity on both the image and :after */
opacity: 0.5;
}
.overlay:after, .elem-overlay {
display: block;
content: '';
position: absolute;
background: no-repeat 50% blue;
background-size: contain;
/* sets the opacity only for the :after */
opacity: 0.5;
}
.image:nth-child(2) {
display: inline-block;
left: 500px;
}
</style>
<div class="image overlay"></div>
<div class="image"><div class="elem-overlay"></div>