Created
April 22, 2018 10:12
-
-
Save wainori2199/2c1dabd98539b4150119f6c40aa251ea to your computer and use it in GitHub Desktop.
YouTubeCSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.youtube { | |
display: inline-block; | |
position: relative; | |
overflow: hidden; | |
width: 320px; | |
height: 180px; | |
} | |
.youtube::before { | |
position: absolute; | |
content: "Click to Play"; | |
color: #fff; | |
text-align: center; | |
font-size: 22px; | |
font-weight: bold; | |
line-height: 180px; | |
background: rgba(0, 0, 0, 0.6); | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
z-index: 10; | |
transition: all 0.3s; | |
} | |
.youtube:hover::before { | |
background: rgba(0, 0, 0, 0.7); | |
cursor: pointer; | |
transition: all 0.3s; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment