<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{ margin:0; padding:0;}
body{ background:#ccc;}
.less{ border-style:solid dashed dashed dashed; border-color:red transparent transparent transparent; border-width:10px 10px 0 10px;}
.more{ border-style:dashed dashed solid dashed; border-color: transparent transparent red transparent; border-width:0 10px 10px 10px;}/* dashed 边框透明 */
a{ display:inline-block; position:relative; height:0; overflow:hidden; vertical-align:middle;}/* height:0;解决i.e.下显示高度问题 */
.block{ width:200px; height:60px; line-height:60px; text-align:center; background:green; overflow:hidden; vertical-align:middle;}
</style>
</head>
<body>
<div class="block">
<a href="" class="less"></a>
</div>
<br />
<div class="block">
<a href="" class="more"></a>
</div>
</body>
</html>
border 写的小三角
最新推荐文章于 2021-08-04 01:01:25 发布