How to create a curve tail for speech bubble with CSS?

后端 未结 1 1580
孤城傲影
孤城傲影 2021-01-12 17:22

I\'m creating a speech bubble with CSS and I have reached this far.

相关标签:
1条回答
  • 2021-01-12 18:24

    As webtiki says, you can get this result adapting my previous answer (Even though may be it is a little bit difficult)

    .container {
      width:300px;
      margin:5px;
    }
    .test 
    {
    position: relative;
    width: 300px;
    height: 150px;
    padding: 0px;
    background: pink;
    border-radius: 6px;
    }
    
    .test:after {
        content: '';
        top: 1px;
        right: -29px;
        position: absolute;
        border: 0px solid;
        display: block;
        width: 38px;
         height: 26px;
        background-color: transparent;
        border-bottom-left-radius: 50%;
        border-bottom-right-radius: 50%;
        box-shadow: -21px 9px 0px 8px pink;
    }
    <div class="container">
      <div class="test"></div>
    </div>
    <img src="http://i.stack.imgur.com/MYlKY.png" alt="enter image description here">

    0 讨论(0)
提交回复
热议问题