PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

DIV+CSS实现左侧带三角形的提示框

原创
2016-09-21 13:56:04 1435浏览

实现效果

实现代码

DOCTYPE html>
html>
  head>
    meta charset="UTF-8">
    link rel="shortcut icon" href="resources/img/logo-color.png" type="image/x-icon">
    title>测试title>
    style>
    .out-div {
        color: #FFFFFF;
        font-size: 16px;
        line-height: 40px;
        display: inline-block;
        height: 40px;
        width: 200px;
        text-align: center;
        border-radius: 5px;
        margin-left: 32px;
        vertical-align: top;
        background-color: maroon;
    }
    
    .arrow {
        width: 0px;
        height: 0px;
        border-top: 10px solid transparent;
        border-right: 10px solid;
        border-bottom: 10px solid transparent;
        position: absolute;
        margin-left: -10px;
        margin-top: 10px;
        border-right-color: maroon;
    }
    style>
  head>
  body>
    div class="out-div">
        div class="arrow" >div>
        span>这是一个提示框span>
    div>
  body>
html>

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。