Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ilonacodes
Created April 15, 2020 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilonacodes/82215b8c73c54a7c2e17535f9c4dd2d3 to your computer and use it in GitHub Desktop.
Save ilonacodes/82215b8c73c54a7c2e17535f9c4dd2d3 to your computer and use it in GitHub Desktop.
VanillaJS — index.css
/*index.css*/
body {
font-size: 24px;
}
.wrapper {
width: 500px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
position: absolute;
}
.card {
width: 150px;
display: none;
font-size: 10px;
color: black;
position: absolute;
z-index: 100;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
}
.link-with-preview {
position: relative;
}
.card img {
width: 150px;
}
.card-title {
font-size: 14px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment