<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
.box1 {
width: 0;
height: 0;
border-top: 10px solid #00B057;
border-bottom: 10px solid #0055ff;
border-left: 10px solid #aaaa7f;
border-right: 10px solid #ff55ff;
}
.box2 {
margin:100px auto;
width: 0;
height: 0;
/* 为了兼容低版本浏览器 */
line-height: 0;
font-size: 0;
border: 10px solid transparent;
border-top-color: #00B057;
}
.jd {
position: relative;
width: 120px;
height: 249px;
background-color: #35BF5C;
}
.jd span {
position: absolute;
right: 10px;
top: -20px;
width: 0;
height: 0;
/* 为了兼容低版本浏览器 */
font-size: 0;
line-height: 0;
border: 10px solid transparent;
border-bottom-color: #ff55ff;
}
</style>
</head>
<body>
<div class="box1"></div>
<div class="box2"></div>
<div class="jd">
<span></span>
</div>
</body>
</html>
CSS三角应用-实现京东效果
最新推荐文章于 2024-08-26 10:10:15 发布