Chinaunix首页 | 论坛 | 博客
  • 博客访问: 531956
  • 博文数量: 119
  • 博客积分: 3167
  • 博客等级: 中校
  • 技术积分: 1215
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-20 21:21
文章分类

全部博文(119)

文章存档

2015年(21)

2012年(4)

2011年(1)

2007年(11)

2006年(50)

2005年(32)

分类: 系统运维

2012-12-05 18:32:19

 
把元素定义成块级0大小(0宽0高0字号0行高)后, 通过改变元素的border-color和border-width实现




  1. <style>
  2. .angle {
  3.  margin:50px 25px;
  4.  padding:0px;
  5.  position:relative;
  6.  z-index:1;
  7.  background-color:rgb(51,88,159);
  8.  width:500px;
  9.  height:150px;
  10.  color:rgb(255,255,255);
  11.  text-align:center;
  12.  line-height:150px;
  13.  font-size:14px}
  14. </style>



  15. <div class="angle">
  16. <span class="top" style="position:absolute; z-index:0; border-style:solid; width:0px; height:0px; line-height:0; font-size:0px; border-width:0px 20px 20px ; border-color:transparent transparent rgb(51,88,159); left:100px; top:-20px"></span>

  17. test1234567890
  18. </div>




阅读(1314) | 评论(0) | 转发(0) |
0

上一篇:CSS圆角背景

下一篇:DNS的SPF记录

给主人留下些什么吧!~~