Skip to content

Instantly share code, notes, and snippets.

@samson-sham
Created September 14, 2023 08:15
Show Gist options
  • Save samson-sham/7362e5337e6546501b4557650cddcb71 to your computer and use it in GitHub Desktop.
Save samson-sham/7362e5337e6546501b4557650cddcb71 to your computer and use it in GitHub Desktop.
.playbutton {
position: absolute;
z-index: 10;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
box-sizing: content-box;
display: block;
}
.playbutton::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
box-sizing: content-box;
display: block;
width: 80px;
height: 80px;
background: #4b4b4bc7;
border-radius: 50%;
}
.playbutton span {
display: block;
margin-left: 8px;
position: relative;
z-index: 3;
width: 0;
height: 0;
border-left: 24px solid #fffff7;
border-top: 14px solid transparent;
border-bottom: 14px solid transparent;
}
div.shaka-video-container:hover .playbutton::before {
background: #9b9b9bc7;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment