<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>价格秒杀-css三角形</title>
<style>
.box {
position: relative;
width: 140px;
height: 20px;
margin: 100px auto;
}
.box .left {
float: left;
width: 80px;
height: 100%;
background-color: red;
color: #fff;
}
.box .right {
float: right;
width: 60px;
height: 100%;
background-color: pink;
text-decoration: line-through;
}
.box .sj {
position: absolute;
left: 60px;
width: 0;
height: 0;
border-color: transparent pink transparent transparent;
border-style: solid;
border-width: 20px 20px 0 0;
}
</style>
</head>
<body>
<div class="box">
<!-- 可以在left里面放个i,专门做三角形 -->
<div class="sj"></div>
<!-- 下面这两个模块可以用span呐 -->
<div class="left">¥1650</div>
<div class="right">¥5650</div>
</div>
</body>
</html>
京东秒杀模块——css三角形妙用