Html
    Css
    Js

    
                        
.box {
	width:400px;
	height:300px;
	position:relative;
	background-color:#B1DFBB;
	float:left;
	margin-left:100px;
	margin-top:20px
}
.borderLine {
	position:absolute;
	background-color:#006600;
}
.borderLeft {
	height:0;
	width:3px;
	top:0;
	left:0;
}
.borderRight {
	bottom:0;
	right:0;
	width:3px;
	height:0;
}
.borderTop {
	height:3px;
	width:0;
	top:0;
	right:0;
}
.borderBottom {
	bottom:0;
	left:0;
	width:0;
	height:3px;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

div元素hover边框填充效果

更新时间:2020-12-15 23:20:12

0