Skip to content

Instantly share code, notes, and snippets.

@i2r
Created February 9, 2012 04:50
Show Gist options
  • Select an option

  • Save i2r/1777402 to your computer and use it in GitHub Desktop.

Select an option

Save i2r/1777402 to your computer and use it in GitHub Desktop.
PopUp
/**
* PopUp
*/
body {
padding: 3em;
background: white;
color: black;
}
.dd {
background: #dfe;
position: absolute;
z-index: 20;
/border: 4px solid #aaa;
box-shadow: 0 0 5px 1px rgba(0,0,0,0.35);
}
.dd-tip {
position: absolute;
width: 30px;
height: 30px;
left: 50%;
top: -14px;
margin-left: -15px;
clip: rect(0 30px 14px 0);
/top: -20px;
/height: 0;
/width: 0;
/margin-left: -8px;
/border: 8px dotted transparent;
/border-bottom: 8px solid #aaa;
/clip: rect(auto auto auto auto);
}
.dd-tip::before {
display: block;
width: 14px;
height: 14px;
position: relative;
left: 7px;
top: 7px;
content: "";
background: #dfe;
transform: rotate(45deg);
box-shadow: 0 0 5px 2px rgba(0,0,0,0.2);
}
<div class="dd">
<i class="dd-tip"></i>
<div style="padding: 1em">content 1 2 4 4 4 5<br> 5 6 6 6 7 7 7 7 7</div>
</div>
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment