CSS3

css实现微信聊天框

2017-05-19  本文已影响0人  _conquer_

html

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,target-densitydpi=medium-dpi,initial-scale=1, maximum-scale=1">
        <title></title>
    </head>
    <style type="text/css">
         #item {
        position: relative;
        width: 150px;
        min-height: 50px;
        background: #25a23b;
        border-radius: 5px;
        line-height: 50px;
        margin-left: 10px;
        word-break: break-word;
        color: white;
        padding: 5px;
        line-height: 18px;
    }
     #item::after {
            content: "";
            display: block;
            position: absolute;
            width: 0;
            height: 0;
            border: 8px solid transparent;
            border-right-color: #25a23b;
            top: 15px;
            left: -14px;
        }
    </style>
    <body>
        <p id="item">
            嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿嘿
        </p>
    </body>
</html>

实现效果图

上一篇 下一篇

猜你喜欢

热点阅读