Html
    Css
    Js

    
                        
* {
	margin:0;
	padding:0;
	list-style:none;
}
img {
	border:0;
	width:300px;
	height:150px;
}
.box {
	width:300px;
	height:150px;
	margin:20px auto;
	position:relative;
	border:1px solid #eee;
}
.box .border-left {
	width:1px;
	height:0px;
	background:black;
	position:absolute;
	left:-1px;
	bottom:0;
}
.box .border-bottom {
	width:0px;
	height:1px;
	background:black;
	position:absolute;
	left:0;
	bottom:0px;
}
.box .border-top {
	width:0px;
	height:1px;
	background:black;
	position:absolute;
	right:0;
	top:0px;
}
.box .border-right {
	width:1px;
	height:0px;
	background:black;
	position:absolute;
	right:-1px;
	top:0;
}

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

鼠标悬停边框围绕效果

0