Created
July 16, 2020 06:34
-
-
Save nakorndev/5e6e12fefe277966e7746896e40b2770 to your computer and use it in GitHub Desktop.
tag-cover.html
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<style> | |
.cover { | |
position: relative; | |
display: inline-block; | |
} | |
.cover > .tag { | |
position: absolute; | |
z-index: 1; | |
top: 0; | |
right: 0; | |
padding: 1em 2em; | |
background-color: rgba(255, 255, 255, 0.75); | |
} | |
</style> | |
</head> | |
<body> | |
<div class="cover"> | |
<img src="https://images.pexels.com/photos/3793316/pexels-photo-3793316.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" alt="Title"> | |
<span class="tag">Tag</span> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment