Using border characteristics to realize the effect of chat bubbles

Source: Internet
Author: User

Using the border feature, the realization of the triangle, very simple, we directly see the effect:

Html:

<div class= "Bubble-container" > Hello     <div class= "Bubble-tail" ></div></div>

Css:

. bubble-Container {            height:100px;            line-height:100px;            Margin-bottom:2em;            Padding-left:2em;            Background: #3EC22D;            position:relative;            Font-family: "Microsoft Jas Black";            Color:white;            Border-radius:10px;        }        . Bubble-container. bubble-Tail {            width:0px;            height:0px;            Position:absolute;            left:50px;            Border-width:15px;            Border-style:solid;            Border-color: #3EC22D transparent transparent transparent;        }

Using the border feature to achieve chat bubble effect

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.