본문 바로가기

프론트엔드/HTML_CSS

[CSS] 세모 말풍선 만들기

<div style="height: 60px; line-height: 60px;">
  <img src="@/이미지.svg" style="width: 36px; height: 36px;">

  <div class="drop-bubble">
      <div class="bubble-text">
        <span>테스트 1.</span>이곳은 도움말 영역입니다.<br>
        <span>테스트 2.</span>이곳은 도움말 영역입니다.<br>
      </div>
   </div>
</div>



  .drop-bubble {
    z-index:100;
    position: absolute;
    margin-top: 5px;
    background-color: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 10px;
    font-size: 16px;
    text-align: left;
    right: 620px;
  }

  .drop-bubble :after {
    content: '';
    position: absolute;
    border-style: solid;
    border-width: 0 16px 20px 17.5px;
    border-color: #FFFFFF transparent;
    display: block;
    width: 0;
    z-index: 1;
    top: -18.5px;
    left: 220px;
  }

  .drop-bubble :before {
    content: '';
    position: absolute;
    border-style: solid;
    border-width: 0 16px 20px 17.5px;
    border-color: #dbdbdb transparent;
    display: block;
    width: 0;
    z-index: 0;
    top: -20px;
    left: 220px;
  }

  .bubble-text {
    height: 100%;
    width: 330px;
    padding: 10px 20px;
    font-size: 14px;
    line-height: 30px;
  }