JSFiddle - React, Tailwind, and code Playground
by fredd man
HTML
<div id="wrap">
<div id="outer">
<div id="profile"></div>
<div id="content">
<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v14.0" nonce="fsHVlbCK"></script>
<div class="fb-video" data-href="https://www.facebook.com/100076491982626/videos/432931795498992/" data-width="500" data-show-text="false"><blockquote cite="https://www.facebook.com/100076491982626/videos/432931795498992/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/100076491982626/videos/432931795498992/"></a><p></p>Publicado por <a href="https://www.facebook.com/people/Freddy-Mamani-Bautista/100076491982626/">Freddy Mamani Bautista</a> en Sábado, 28 de mayo de 2022</blockquote></div>
<div>Monwell Partee</div>
<div>UX / UI Designer</div>
</div>
</div>
</div>
CSS
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
background: #e6e9f0;
margin: 0;
padding: 0;
}
#wrap {
position: relative;
width: 700px;
height: 780px;
margin: 0 auto;
}
#outer {
position: relative;
width: 100%;
height: 100%;
background: url('https://www.facebook.com/100076491982626/videos/432931795498992/') no-repeat center center;
transform-origin: 0% 1%;
border-radius: 10px;
box-shadow: 0px 3px 25px rgba(0, 0, 0, 0.2);
overflow: hidden;
margin-top: 10px;
}
#outer:before {
content: "";
position: absolute;
bottom: 0;
width: 100%;
height: 100px;
-webkit-backdrop-filter: blur(20px);
backdrop-filter: blur(20px);
}
#profile {
background: url('https://source.unsplash.com/random/300x300') no-repeat center center;
position: absolute;
width: 60px;
height: 60px;
bottom: 0;
margin: 20px;
border-radius: 100px;
background-size: contain;
}
#content {
font-size: 20px;
position: absolute;
left: 0px;
bottom: 0;
margin: 30px 100px;
color: white;
text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
#content div:last-child {
font-size: 15px;
opacity: 0.7;
}
JavaScript
let outer = document.getElementById('outer'),
wrapper = document.getElementById('wrap'),
maxWidth = outer.clientWidth,
maxHeight = outer.clientHeight;
window.addEventListener("resize", resize);
resize();
function resize(){let scale,
width = window.innerWidth,
height = window.innerHeight,
isMax = width >= maxWidth && height >= maxHeight;
scale = Math.min(width/maxWidth, height/maxHeight);
outer.style.transform = isMax?'':'scale(' + scale + ')';
wrapper.style.width = isMax?'':maxWidth * scale;
wrapper.style.height = isMax?'':maxHeight * scale;
}