首页htmlbubblePage Widget - 如何创建CSS3语音泡沫

Page Widget - 如何创建CSS3语音泡沫

我们想知道如何创建CSS3语音泡沫。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
p.speech {
  position: relative;
  width: 200px;
  height: 100px;
  text-align: center;
  line-height: 100px;
  background: #fff;
  border: 2px solid #666;
  -moz-border-radius: 30px;
  -webkit-border-radius: 30px;
  border-radius: 30px;
  -moz-box-shadow: 2px 2px 4px #888;
  -webkit-box-shadow: 2px 2px 4px #888;
  box-shadow: 2px 2px 4px #888;
}

p.speech:before {
  content: " ";
  width: 0;
  height: 0;
  position: absolute;
  top: 100px;
  left: 30px;
  border: 25px solid #666;
  border-color: #666 transparent transparent #666;
}

p.speech:after {
  content: " ";
  width: 0;
  height: 0;
  position: absolute;
  top: 100px;
  left: 38px;
  border: 15px solid #fff;
  border-color: #fff transparent transparent #fff;
}
</style>
</head>
<body>
  <p class="speech">w3cschool.cn
  </p>
</body>
</html>