html1px灰色虚线边框,CSS中1px虚线边框的方法

1PX的概念错误

h3{

position:absolute;

top:-15px;

left:30px;

margin:0;

padding:0 5px;

line-height:25px;

background:red;

border:1px solid #000;

}

.outer ,.outer2 {

position:relative;

float:left;

width:300px;

border:2px dashed #000;

margin-top:20px;

margin-left:20px;

background:#ffffcc;

}

.inner {

position:absolute;

border:1px solid white;

width:100%;

height:100%;

position:relative;

z-index:100;

margin:-1px;

}

.outer p,.outer2 p {padding:5px;margin:10px 0 0;}

.outer h3 a, .outer2 h3 a{

line-height:20px;

font-size:70%;

border:1px solid #000;

background:#ffffcc;

text-decoration:none;

vertical-align:top;

padding:0 5px;

}

.outer2 {border:1px dashed #000}

优秀的边框更多 >

本例只为说明在IE中存在1px概念的一个bug,在IE中{border:2px dashed #999;}与{border:1px dashed #999}基本上看不出什么差别,但可以用标准化浏览器分辩出来。

这个边框存在质量问题更多 >

模板无忧为编程者提供源程序参考,常用网页特效代码,是一个以学习为主的源码站。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值