zoukankan      html  css  js  c++  java
  • css一个带箭头的对话框

    内容内容内容内容内容

    内容内容内容内容内容

    利用 :before 和 :after 伪类添加样式

    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta charset="UTF-8">
            <title>css对话框箭头</title>
            <style>
                .comment{
                     300px;
                    border: 1px solid #376956;
                    position: relative;
                    background-color: #D0E9FF;
                    padding: 10px 20px;
                    border-radius: 8px;
                    position: relative;
                    margin-left: 20px;
                }
                .comment:before, .comment:after {
                    content: "";
                    display: block;
                    border- 12px;
                    position: absolute;
                    top: 20px;
                    left: -24px;
                    border-style: solid dashed dashed;
                    border-color: transparent #376956 transparent transparent;
                    font-size: 0;
                    line-height: 0;
                }
                .comment:after {
                    top: 20px;
                    left: -23px;
                    border-color: transparent #D0E9FF transparent transparent;
                }
            </style>
        <body>
            <div class="comment">
                <p>内容内容内容内容内容</p>
                <p>内容内容内容内容内容</p>
            </div>
        </body>
    </html>
    

      

  • 相关阅读:
    Resin4 自定义端口
    设备系统识别,解决方案。
    Reactjs-JQuery-Vuejs-Extjs-Angularjs对比
    HTML页面的加载
    传输层协议TCP和UDP
    常用的14种HTTP状态码速查手册
    前端总结·基础篇·CSS(二)视觉
    前端总结·基础篇·CSS(一)布局
    AngularJS 中的Promise --- $q服务详解
    ngRoute 和 ui.router 的使用方法和区别
  • 原文地址:https://www.cnblogs.com/sonicwater/p/8341193.html
Copyright © 2011-2022 走看看