Skip to content

Instantly share code, notes, and snippets.

@landys
Created December 29, 2014 08:43
Show Gist options
  • Save landys/d2a2255c5704ee5444a5 to your computer and use it in GitHub Desktop.
Save landys/d2a2255c5704ee5444a5 to your computer and use it in GitHub Desktop.
Talking bubble with CSS.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<style type="text/css">
.talkbubble {
width: 100%;
height: 23px;
background: #f0f0f0;
position: relative;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
margin-top: 8px;
}
.talkbubble:before {
content: "";
position: absolute;
bottom: 100%;
right: 25px;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-bottom: 5px solid #f0f0f0;
border-right: 5px solid transparent;
}
</style>
</head>
<body>
<div class="talkbubble">Hello World!</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment