zoukankan      html  css  js  c++  java
  • XHTML + CSS使用技巧

    1、Div水平垂直居中。

    .div{position:absolute;top:50%;left:50%;width:500px;height:300px; margin-top:-150px; margin-left:-250px;

    border:1px #999 solid;} 

    2、小下拉框箭头示例。 

    <div><b>&nbsp;</b></div> 

    div b{
    margin: 6px 0 0 3px;
    border-style: solid dashed dashed;
    border-color: transparent;
    border-top-color: #000;
    font-size: 0;
    0;
    height: 0;
    line-height: 0; border- 3px 3px 0;
    }

    或者:

    div b{

    border-style:solid;
    _border-style:solid dotted dotted dotted;
    border-5px 5px 0;
    display:inline-block;
    border-left-color:transparent;
    border-right-color:transparent;
    border-left-color:transparent;
    0; height:0;
    line-height:0;
    font-size:0;
    overflow:hidden; 

    }

    3、去除a链接点击后的虚线框。

    添加样式方法:outline:none; (ie不适用)

    js方法(jquery):

    $(document).ready(function() { 
    $("a").bind("focus",function(){this.blur()}); 

    }); 缺点:a:active样式在IE(6,7,8)浏览器下不支持了 

  • 相关阅读:
    javaSE第十五天
    javaSE第十四天
    javaSE第十三天
    javaSE第十二天
    javaSE第十一天
    javaSE第十天
    javaSE第九天
    python011 Python3 字典
    python010 Python3 元组
    python009 Python3 列表
  • 原文地址:https://www.cnblogs.com/yeer/p/2229782.html
Copyright © 2011-2022 走看看