zoukankan      html  css  js  c++  java
  • 带箭头的提示框样式

    做提示框的箭头时可以用以下方法:

    HTML:

    <span class="form-error">输入错误!<s class="dec1"></s><s class="dec2"></s></span>

    CSS:

    .form-error{
        position: absolute;
        right: 0;
        top: -35px;
        padding: 0px 5px 0px 10px;
        border: 1px solid #E2E2E2;
        background: #FFFFFF;
        color: #ff721a;
        line-height:24px;
        z-index: 999;
        display: none;
    }
    .form-error s{
        font-family: simsun;
        font-size: 16px;
        height: 19px;
        right: 10px;
        line-height: 21px;
        position: absolute;
        text-decoration: none;
        top: 15px;
        width: 17px;
    }
    .form-error s.dec1{
        color: #E2E2E2;
    }
    .form-error s.dec2{
        color: #fff;
        top: 14px;
    }

    思路:

    s标签中是两个菱形符号,通过对菱形颜色值设定和绝对位置的定位来实现箭头。其他位置的箭头调整定位位置即可。

    如果文字前需要加图标,可以在form-error里增加背景图片,也可以在文字前加img标签,再调整位置即可。

  • 相关阅读:
    京东精益敏捷教练分享:敏捷助力产品创新!
    设计规范 | 详解组件控件结构体系
    Axure响应式进阶
    通讯录表设计
    TEST1
    c#练习四单元总结
    窗体控件应用总结(1)
    .NET(c#理解)
    test2-11
    test1-1
  • 原文地址:https://www.cnblogs.com/sakura-panda/p/5166037.html
Copyright © 2011-2022 走看看