继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

css制作三角形及气泡..

_辣子
关注TA
已关注
手记 11
粉丝 9
获赞 119
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            *{ margin: 0; padding: 0;}
            .box{ width: 0; height: 0; border:50px solid #f00; border-color:red transparent transparent transparent;}
            .box2{width: 0; height: 0; border:50px solid #f00; border-color:red red transparent transparent; line-height: 0;}

            .box3{ width:200px; height: 100px; border: 5px solid #2E8DED; margin-left:10px; position: relative;} 
            .box3 .arror{ position: absolute; top: 100px; left:30px; width: 50px; height: 50px;}
            .a1{ border:30px solid #f00; display: block; border-color:#2E8DED transparent  transparent transparent;}
            .a2{ position: absolute; left: 0; top:-8px; border:30px solid #f00; display: block; border-color:#fff transparent  transparent transparent;}
        </style>
        <script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
    </head>
    <body>
        <div class="box">

        </div>
        <div class="box2">

        </div>
        <div class="box3">
            <div class="arror">
                <span class="a1"></span>
                <span class="a2"></span>
            </div>
            <p>
                气泡泡泡气泡泡泡气泡泡泡气泡泡泡气泡泡泡
            </p>
        </div>
        <script type="text/javascript">

        </script>
    </body>
</html>

效果:
图片描述

打开App,阅读手记
1人推荐
发表评论
随时随地看视频慕课网APP