Skip to content

Instantly share code, notes, and snippets.

@Shadowfiend
Created July 18, 2011 14:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Shadowfiend/1089727 to your computer and use it in GitHub Desktop.
Save Shadowfiend/1089727 to your computer and use it in GitHub Desktop.
CSS for popup with arrow.
.popup {
position: relative;
font-size: 12px;
width: 300px;
background-color: #28C0F7;
color: white;
padding: 15px;
margin-left: 15px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
-o-border-radius: 10px;
-ms-border-radius: 10px;
-khtml-border-radius: 10px;
border-radius: 10px;
-moz-box-shadow: rgba(0, 0, 0, 0.8) 0 0 5px 0;
-webkit-box-shadow: rgba(0, 0, 0, 0.8) 0 0 5px 0;
-o-box-shadow: rgba(0, 0, 0, 0.8) 0 0 5px 0;
box-shadow: rgba(0, 0, 0, 0.8) 0 0 5px 0;
}
h5 {
margin: 0;
font-size: 120%;
}
.popup .arrow {
position: absolute;
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
width: 30px;
height: 30px;
background-color: #28C0F7;
}
.left-arrow .arrow {
left: -12px;
top: 20px;
}
.right-arrow .arrow {
right: -12px;
top: 20px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment