61,112
社区成员
发帖
与我相关
我的任务
分享
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>研究</title>
<style type="text/css">
.div1{
width: 400px;
height: 200px;
border: 3px solid #1475AC;
position: relative;
}
.div2{
width: 30px;
height: 30px;
border-top: 3px solid #1475AC;
transform: rotate(135deg);
position: absolute;
top:-18px;
left: -17px;
background-color: #fff;
}
.div3{
width: 30px;
height: 30px;
border-bottom: 3px solid #1475AC;
transform: rotate(45deg);
position: absolute;
top:-18px;
right:-17px;
background-color: #fff;
}
</style>
</head>
<body>
<div class="div1">
<div class="div2"></div>
<div class="div3"></div>
</div>
</body>
</html>
这样就行了[/quote]
这技巧不错,脑洞很大,谢谢
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>研究</title>
<style type="text/css">
.div1{
width: 400px;
height: 200px;
border: 3px solid #1475AC;
position: relative;
}
.div2{
width: 30px;
height: 30px;
border-top: 3px solid #1475AC;
transform: rotate(135deg);
position: absolute;
top:-18px;
left: -17px;
background-color: #fff;
}
.div3{
width: 30px;
height: 30px;
border-bottom: 3px solid #1475AC;
transform: rotate(45deg);
position: absolute;
top:-18px;
right:-17px;
background-color: #fff;
}
</style>
</head>
<body>
<div class="div1">
<div class="div2"></div>
<div class="div3"></div>
</div>
</body>
</html>
这样就行了