图片上的这种
.box{
width:100px;
height: 100px;
margin: 200px;
border-top: 4px solid black;
border-left: 4px solid black;
transform: rotateZ(135deg);
}
借助border做的白边盖住做了一个凹进去的
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>1</title>
<style>
.box-wrap{
width: 100px;
/* margin-right: 30px; */
position: relative;
}
.box{
width: 100px;
height: 30px;
background-color: #ccc;
position: relative;
}
.box1{
z-index: 2;
}
.box-wrap i{
width: 22px;
height: 22px;
border: 2px solid #fff;
background-color: #ccc;
position: absolute;
right: -14px;
top: 2px;
transform: rotate(45deg);
z-index: 1;
}
.fl{
float: left;
}
.fr{
float: right;
}
</style>
</head>
<body>
<div class="box-wrap fl"><div class="box box1"></div><i></i></div>
<div class="box-wrap fl"><div class="box box2"></div></div>
</body>
<script>
</script>
</html>
4 回答1.9k 阅读✓ 已解决
5 回答2k 阅读
2 回答1.2k 阅读✓ 已解决
3 回答1.1k 阅读✓ 已解决
2 回答1.4k 阅读
1 回答2.2k 阅读
2 回答1.6k 阅读
基本可用的一个实现
https://codepen.io/pantao/pen...