【问题标题】:CSS adding line over speech bubbleCSS在语音气泡上添加线条
【发布时间】:2020-09-05 13:29:11
【问题描述】:

我有以下用于对话气泡的 css

现在,我想在对话气泡上添加一个轮廓。有没有人知道怎么做?

.sb13:before {
  content: "";
  width: 0px;
  height: 0px;
  position: absolute;
  border-left: 15px solid transparent;
  border-right: 15px solid #f2f2f2;
  border-top: 15px solid #f2f2f2;
  border-bottom: 15px solid transparent;
  left: -16px;
  top: 0px;
}

.box3 {
  overflow: initial !important;
  margin-top: 10px;
  border-radius: 15px;
  background: #f2f2f2;
  color: #111;
  padding: 15px;
  position: relative;
}
<div class="box3 sb14">test</div>

【问题讨论】:

  • 我添加了一个普通的 html,但我正在编辑的 css 将进入 youtube livechat popout。

标签: html css border outline


【解决方案1】:

添加border

Docs

.sb13:before {
  content: "";
  width: 0px;
  height: 0px;
  position: absolute;
  border-left: 15px solid transparent;
  border-right: 15px solid #f2f2f2;
  border-top: 15px solid #f2f2f2;
  border-bottom: 15px solid transparent;
  left: -16px;
  top: 0px;
}

.box3 {
  overflow: initial !important;
  margin-top: 10px;
  border-radius: 15px;
  background: #f2f2f2;
  color: #111;
  padding: 15px;
  position: relative;
  border: 1px solid black;
}
<div class="box3 sb14">test</div>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-10-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-10
    • 1970-01-01
    • 1970-01-01
    • 2022-06-23
    相关资源
    最近更新 更多