Skip to content

Instantly share code, notes, and snippets.

@joshhumble
Created November 30, 2012 16:52
Show Gist options
  • Save joshhumble/4176926 to your computer and use it in GitHub Desktop.
Save joshhumble/4176926 to your computer and use it in GitHub Desktop.
A CodePen by Josh Humble. Another Thought Bubble - Thought bubble consisting of CSS shapes (triangle and circle), gradient...
<div class="container">
<div class="triangle"></div>
<div class="bubble">
<div class="header">
<div class="circle"><p>new!</p></div>
<h1>This is another bubble!</h1>
</div><!--END header-->
<div class="content">
<p>Hello &mdash; this is another CMS panel.</p>
</div><!--END content-->
</div>
</div>
h1 {
font:18px/22px "Georgia", serif;
position:relative;
margin:5px 0 0 65px;
color:#eee;
}
.container {
position:relative;
margin:0;
padding:0;
width:200px;
}
.triangle {
background:none;
position:absolute;
top:-39px;
right:0;
width:0;
height:0;
border:20px solid transparent;
border-bottom:20px solid #3D6494;
padding:0;
}
.bubble {
position:relative;
overflow:hidden;
width:200px;
margin:40px 0 0 20px;
background:#fff;
border-radius:10px 10px 10px 10px;
background:#eee;
}
.header {
position:relative;
overflow:hidden;
width:200px;
background:#3D6494;
background:-webkit-linear-gradient(top, #3D6494, #5c95ce);
background:-moz-linear-gradient(top, #3D6494, #5c95ce);
background:-ms-linear-gradient(top, #3D6494, #5c95ce);
background:linear-gradient(top, #3D6494, #5c95ce);
border-radius:10px 10px 0 0;
}
.circle {
width:50px;
height:50px;
position:relative;
float:left;
background:#fff;
border-radius:50%;
margin:5px 0 5px 10px;
box-shadow:inset 1px 1px 3px #000;
}
.circle p {
margin:15px 0 0 4px;
font:bold 16px "Arial", sans-serif;
color:#666;
-webkit-transform:rotate(-35deg);
-moz-transform:rotate(-35deg);
-ms-transform:rotate(-35deg);
transform:rotate(-35deg);
text-transform:uppercase;
}
.content {position:relative;}
.content p {
position:relative;
font:12px/16px "Arial", sans-serif;
color:#666;
padding:10px;
white-space:wrap;
text-shadow:1px 1px 0 #fff;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment