Skip to content

Instantly share code, notes, and snippets.

@cesine
Created November 6, 2016 16:29
Show Gist options
  • Save cesine/fddf6755d2e5daf94c1391917e709de5 to your computer and use it in GitHub Desktop.
Save cesine/fddf6755d2e5daf94c1391917e709de5 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=fddf6755d2e5daf94c1391917e709de5
<!DOCTYPE html>
<html>
<head>
<title>Position</title>
</head>
<body>
Hide the ice-cream scoops which are above the glass!
<div class='full-sundae'>
<div id="top-cherry" class='cherry'></div>
<div class='whipped-cream'></div>
<div class='ice-cream-scoop'></div>
<div class='ice-cream-scoop'></div>
<div class='glass'>
<div class='ice-cream-scoop'></div>
<div class='ice-cream-scoop'></div>
<div class='ice-cream-scoop'></div>
</div>
</div>
</body>
</html>
div {
border-style: solid;
border-width: 1px;
width: 100px;
}
#top-cherry {
position: relative;
left: 40%;
}
.cherry {
background-color: red;
border-radius: 50px;
height: 20px;
width: 20px;
}
.whipped-cream {
background-color: yellow;
border-radius: 50px;
height:20%;
}
.full-sundae {
height:500px;
border-width: 0px;
}
.full-sundae > .ice-cream-scoop{
height:100px;
}
.glass {
border-color: green;
border-width: 5px;
height:60%;
border-radius: 0px 0px 30px 30px;
}
.glass .ice-cream-scoop{
height: 33.3%;
}
.ice-cream-scoop {
border-color: blue;
border-radius: 50px;
}
@cesine
Copy link
Author

cesine commented Nov 6, 2016

Hide the scopes which are above the glass using display: none;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment