ambilighter
Version:
Ambilight around the video, image or canvas HTML elements
114 lines (68 loc) • 1.26 kB
CSS
:root {
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #111;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.wrapper {
display: inline-block;
position: relative;
}
.wrap {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
filter: blur( 30px );
}
.image {
display: block;
position: relative;
}
.video {
display: block;
position: relative;
}
.top {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100px;
filter: brightness(400%);
transition: all .3s ease-in-out;
}
.bottom {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 100px;
filter: brightness(400%);
transition: all .3s ease-in-out;
}
.left {
position: absolute;
left: 0;
top: 0;
width: 100px;
height: 100%;
filter: brightness(400%);
transition: all .3s ease-in-out;
}
.right {
position: absolute;
right: 0;
bottom: 0;
width: 100px;
height: 100%;
filter: brightness(400%);
transition: all .3s ease-in-out;
}