zoukankan      html  css  js  c++  java
  • css 绘制对话框三角符号

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>Test</title>
        <style>
            .tip {
                position: relative;
                background-color: deepskyblue;
                margin: 20px auto;
                 246px;
                height: 43px;
                line-height: 43px;
                color: white;
                text-align: center;
                border-radius: 10px;
                font-family: sans-serif;
            }
            .tip:after {
                content: '';
                position: absolute;
                 0;
                height: 0;
                border: 8px solid;
            }
            .top:after {
                border-bottom-color: deepskyblue;
                left: 50%;
                bottom: 100%;
                margin-left: -15px;
            }
            .right:after {
                border-left-color: deepskyblue;
                left: 100%;
                top: 50%;
                margin-top: -7px;
            }
            .bottom:after {
                border-top-color: deepskyblue;
                top: 100%;
                left: 50%;
                margin-left: -15px;
            }
            .left:after {
                border-right-color: deepskyblue;
                top: 50%;
                right: 100%;
                margin-top: -9px;
            }
        </style>
    </head>
    <body>
        <div class="tip top">top</div>
        <div class="tip bottom">bottom</div>
        <div class="tip left">left</div>
        <div class="tip right">right</div>
    </body>
    </html>
     
  • 相关阅读:
    JS-常用的数据结构之线性表
    Django 数据库增删改查
    Django 静态文件配置及request初识
    Django 基础
    jQuery
    前端之BOM和DOM
    前端js
    前端 css
    前端基础 html
    进度条
  • 原文地址:https://www.cnblogs.com/jintaostudy/p/6078737.html
Copyright © 2011-2022 走看看