<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>CSS输出图形</title>
<style type="text/css">
.square{width:100px;height:100px;background-color:#FFF;position:relative;border:2px #000000 solid;}
.square:before{
content:"";
width:0px;
height:0px;
display:block;
position:absolute;
z-index:2;
top:25%;
right:-28px;
border:15px solid #FFF;
border-color:transparent transparent transparent #FFF;
}
.square:after{content:"";
width:0px;
height:0px;
display:block;
position:absolute;
z-index:1;
top:25%;
right:-30px;
border:15px solid #FFF;
border-color:transparent transparent transparent #000;
}
.a{width:0;height:0;border:40px solid; border-color:transparent transparent transparent #F00;}
</style>
</head>
<body>
<div class='square'></div>
<div class="a"> </div>
</body>
</html>
相关文章
- 03-07前端 CSS的选择器 伪类选择器 CSS3 nth-child()
- 03-07python学习之运用特殊方法,定制类
- 03-07CSS 伪类 ::-webkit-scrollbar 滚动条定义及使用
- 03-07python 类和元类(metaclass)的理解和简单运用
- 03-07Bootstrap的常用类(CSS和布局组件)的总结
- 03-07运用在伪类content上的html特殊字符
- 03-07String类的基本运用一
- 03-07:after伪类+content经典应用举例
- 03-07运用css属性flex将angular meterial toolbar内按钮推向最右端
- 03-07利用伪类选择器与better-scroll的on事件所完成的上拉加载