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)浏览器下不支持了 

相关文章:

  • 2021-11-19
  • 2021-07-07
  • 2021-04-12
  • 2021-10-12
  • 2021-07-20
  • 2021-08-27
  • 2022-12-23
猜你喜欢
  • 2022-01-09
  • 2021-09-06
  • 2022-12-23
  • 2021-11-09
  • 2018-02-23
相关资源
相似解决方案