CSS 纯CSS Web 2.0风格评论泡泡
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CSS 纯CSS Web 2.0风格评论泡泡相关的知识,希望对你有一定的参考价值。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Pure CSS Web 2.0 Comment Bubbles</title>
<style type="text/css">
body { font:20px Arial, Helvetica, sans-serif; }
.bubble1 { overflow:hidden; margin:20px; }
.bubble1 .speach { background-color:#000000; color:#FFFFFF; padding:20px; }
.bubble1 .arrow{ float:right; margin-right:15px; width:0; height:0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #000000; border-bottom: 0; }
.bubble2 { overflow:hidden; margin:20px; }
.bubble2 .speach { background-color:#d9ecfb; color:#486175; padding:20px; }
.bubble2 .arrow{ float:right; margin-right:15px; width:0; height:0; border-left: 15px solid transparent; border-right: 15px solid #d9ecfb; border-bottom: 15px solid transparent; border-top: 0; }
.bubble3 { overflow:hidden; margin:20px; position:relative; }
.bubble3 .speach { background-color:#ebe5d2; color:#7b6f49; padding:20px; margin-left:15px; }
.bubble3 .arrow{ width:0; height:0; border-left: 0px solid transparent; border-right: 15px solid #ebe5d2; border-bottom: 15px solid transparent; border-top: 0; position:absolute; left:0px; top:10px; }
.bubble4 { overflow:hidden; margin:20px; position:relative; }
.bubble4 .speach { background-color:#dfebd2; color:#526340; padding:20px; margin-right:15px; }
.bubble4 .arrow{ width:0; height:0; border-right: 0px solid transparent; border-left: 15px solid #dfebd2; border-top: 15px solid transparent; border-bottom: 0; position:absolute; right:0px; bottom:10px; }
</style>
</head>
<body>
<div class="bubble bubble1">
<div class="speach">Lorem ipsum dolor sit amet, consectetur adipiscing elit. </div>
<div class="arrow"></div>
</div>
<div class="bubble bubble2">
<div class="speach">Lorem ipsum dolor sit amet, consectetur adipiscing elit. </div>
<div class="arrow"></div>
</div>
<div class="bubble bubble3">
<div class="speach">Lorem ipsum dolor sit amet, consectetur adipiscing elit. </div>
<div class="arrow"></div>
</div>
<div class="bubble bubble4">
<div class="speach">Lorem ipsum dolor sit amet, consectetur adipiscing elit. </div>
<div class="arrow"></div>
</div>
</body>
</html>
以上是关于CSS 纯CSS Web 2.0风格评论泡泡的主要内容,如果未能解决你的问题,请参考以下文章