Skip to content

Instantly share code, notes, and snippets.

@willstott101
Created November 13, 2018 16:21
Show Gist options
  • Save willstott101/9a6e7ed69fe89a828778626ba671f44f to your computer and use it in GitHub Desktop.
Save willstott101/9a6e7ed69fe89a828778626ba671f44f to your computer and use it in GitHub Desktop.
// source https://jsbin.com
<html>
<head>
<title></title>
<style type="text/css">
div.sq {
position: absolute;
left: 10px;
width: 300px;
height: 300px;
background-color: blue;
overflow: hidden;
border: solid lightblue 5px;
}
div.sq video {
width: 100%;
height: 60%;
background: grey;
}
div.overlay {
position: absolute;
left: 0;
top: 0;
width: inherit;
height: inherit;
background-color: rgba(50, 255, 50, 0.4);
border: solid lightgreen 5px;
box-sizing: border-box;
}
div.sq.circle {
border-radius: 30px;
}
</style>
</head>
<body>
<div class="sq">
<video src="https://vjs.zencdn.net/v/oceans.webm"></video>
<div class="overlay"></div>
</div>
<div class="sq circle" style="left: 340px">
<video src="https://vjs.zencdn.net/v/oceans.webm"></video>
<div class="overlay"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment