相关疑难解决方法(0)

如何使用CSS为气泡创建曲线尾巴?

我正在用CSS创建气泡,目前为止。

.says{
  width: 200px;
  padding: 20px;
  margin-right: 20px;
  background: #BF7EF2;
  color: #fff;
  box-shadow: -3px 3px 5px #C1B9C8;
  position: relative;
  border-radius: 5px;
}

.says:before{
  content: "";
  position: absolute;
  z-index: -1;
  top: 14px;
  right: -18px;
  height: 20px;
  border-right: 20px solid #BF7EF2;
  border-bottom-right-radius: 25px 20px;
  transform: translate(0, -4px);
  box-shadow: -3px 3px 5px #C1B9C8;
}

.says:after{
  content: "";
  position: absolute;
  z-index: -1;
  top: 7px;
  right: -18px;
  width: 30px;
  height: 30px;
  background: #fff;
  border-bottom-left-radius: 40px 35px;
  transform: translate(0px, -20px);
}
Run Code Online (Sandbox Code Playgroud)
<div class="says">Lorem ipsum dolor sit …
Run Code Online (Sandbox Code Playgroud)

css css3 css-shapes

4
推荐指数
1
解决办法
2722
查看次数

标签 统计

css ×1

css-shapes ×1

css3 ×1