css实现圆角效果

很久之前弄的一个效果了,今天又把它找了出来。

实现这个效果,我感觉更多的是一种投机取巧的东西.当然这个是没有图片的方便.这是css代码:

#circle{
  margin:50px auto;
  width:300px;
  overflow:hidden;
  }
.include{
  background:transparent;
  }
.s1,.s2,.s3,.s4,.s5{
  font-size:1px;
  display:block;
  overflow:hidden;
  background:#66ccff;
  }
.s1,.s2,.s3,.s4{
  height:1px;
  }
.s2,.s3,.s4,.s5{
  border-right:1px solid #fff;
  border-left:1px solid #fff;
	}
.s1{
  margin:0 7px;
  background:#fff;
  }
.s2{
  margin:0 5px;
  border-width:2px;
  }
.s3{
  margin:0 3px;
  border-width:2px;
  }
.s4{
  margin:0 2px;

  }
.s5{
  margin:0 1px;
  height:2px;
  }
.bg{
  background:#66ccff;
  border-right:1px solid #fff;
  border-left:1px solid #fff;
  display:block;
  height:100px;
  overflow:hidden;
  font-weight:bold;
  }
		

html代码

<div id="circle">
<span class="include">
<strong class="s1">&nbsp;</strong>
<strong class="s2">&nbsp;</strong>
<strong class="s3">&nbsp;</strong>
<strong class="s4">&nbsp;</strong>
<strong class="s5">&nbsp;</strong>
</span>
<span class="bg">
css圆角
</span>
<span class="include">
<strong class="s5">&nbsp;</strong>
<strong class="s4">&nbsp;</strong>
<strong class="s3">&nbsp;</strong>
<strong class="s2">&nbsp;</strong>
<strong class="s1">&nbsp;</strong>
</span>
</div>

利用<strong>标签的逐渐缩小,做成圆角的效果,主要是给<strong>标签用上了font-size;margin;border;display;height;这些属性!

原始的个站转移了

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值