XHTML + CSS提示

來源:互聯網
上載者:User

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;
width: 0;
height: 0;
line-height: 0; border-width: 3px 3px 0;
}

或者:

div b{

border-style:solid;
_border-style:solid dotted dotted dotted;
border-width:5px 5px 0;
display:inline-block;
border-left-color:transparent;
border-right-color:transparent;
border-left-color:transparent;
width: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)瀏覽器下不支援了 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.