css3 扇形

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<style>
.radiv cite { position: relative; float: left; }
.rotate1 { top: 0; left: 0; position: absolute; width: 100px; height: 100px;clip: rect(0px,50px,100px,0px); border-radius: 100px; background-color: yellow;z-index: 3; }
.rotate2 { top: 0; left: 0; position: absolute; width: 100px; height: 100px; transform: rotate(-00deg); -webkit-transform: rotate(0deg); clip: rect(0px,50px,100px,0px); border-radius: 100px; background-color: #dddddd; z-index: 5;}
.rotate3 { top: 0; left: 0; position: absolute; width: 100px; height: 100px; transform: rotate(180deg); -webkit-transform: rotate(180deg); clip: rect(0px,50px,100px,0px); border-radius: 100px; background-color: yellow;  z-index: 3; }
.rotate4 { top: 0; left: 0; position: absolute; width: 100px; height: 100px; /*transform: rotate(-00deg);*/
clip: rect(0px,50px,100px,0px); border-radius: 100px; background-color: yellow;z-index: 4; }
.fzabout { height: auto; ; }
.fzabout cite { width: 100px; height: 100px; display: block; position: relative; margin: 0 auto; }
.fzabout cite .bg{ position: absolute;left:0;top:0;  width: 100px; height: 100px; background: #dddddd; z-index: 2; border-radius: 100%;}
.fzabout cite.a1 .fontdiv font{ color: #4cb7b2;}
.fzabout cite.a2 .fontdiv font{ color: #da5550;}
.fzabout cite.a3 .fontdiv font{ color: #bf954d;}
.fzabout cite.a1 .rotate1,.fzabout cite.a1 .rotate3,.fzabout cite.a1 .rotate4{background-color: #4cb7b2;}
.fzabout cite.a2 .rotate1,.fzabout cite.a2 .rotate3,.fzabout cite.a2 .rotate4{background-color: #da5550;}
.fzabout cite.a3 .rotate1,.fzabout cite.a3 .rotate3,.fzabout cite.a3 .rotate4{background-color: #bf954d;}
.fzabout .fontdiv { position: absolute; width: 90px; height: 90px; overflow: hidden; left: 5px; top: 5px; z-index: 10; font-style: normal; font-size: 12px; background: #fff; border-radius: 50%; text-align:center }
.fzabout .fontdiv font { display: block; font-style: normal; font-size: 21px; margin: 16px 0 5px 0; }
.fzabout .fontdiv span { display: block; font-style: normal; font-size: 16px; }
.fzabout dl { overflow: hidden; float:left }
.fzabout dl dd { margin: 10px 0; }
.fzabout dl dt strong{ font-weight: normal;}
</style>
<div class="fzabout">
        <dl class="a1">
            <dd>
                <cite class="a1 b1" >
                </cite>
            </dd>
        </dl>
    
        <dl class="a2  b1">
            <dd>
                <cite class="a2 b2" >
                   
                </cite>
            </dd>
            
        </dl>
        <dl class="a3  b1">
            <dd>
                <cite class="a3 b3" >
                   
                </cite>
            </dd>
        </dl>
        
        
        <div style=" clear:both"></div>
        
        
        <dl class="a1 ">
            <dd>
                <cite class="a1 b4" >
                </cite>
            </dd>
        </dl>
    
        <dl class="a2">
            <dd>
                <cite class="a2 b5" >
                   
                </cite>
            </dd>
            
        </dl>
        <dl class="a3">
            <dd>
                <cite class="a3 b6" >
                   
                </cite>
            </dd>
        </dl>
</ul>

<script type="text/javascript" src="../public/js/jquery-2.0.3.min.js"></script>
<script>
	rotate($(".fzabout cite.b1"),55,"200")
	rotate($(".fzabout cite.b2"),40,"ds")
	rotate($(".fzabout cite.b3"),80,"333")
	
	function rotate(obj,deg,size){
			var deg1=360*(deg/100) 
						
			if(deg<51){
				obj.html('<div class="fontdiv"><font>'+deg+'%</font><span>'+size+'</span></div><i class="rotate1" style="transform: rotate('+deg1+'deg);-webkit-transform: rotate('+deg1+'deg);"></i><i class="rotate2" ></i><i class="bg"></i>') 
			}else{
				obj.html('<div class="fontdiv"><font>'+deg+'%</font><span>'+size+'</span></div><i class="rotate3"></i><i class="rotate4" style="transform: rotate('+deg1+'deg);-webkit-transform: rotate('+deg1+'deg);"></i><i  class="bg"></i>')
			}
	}
	
	rotate1($(".fzabout cite.b4"),55)
	rotate1($(".fzabout cite.b5"),40)
	rotate1($(".fzabout cite.b6"),80)
	function rotate1(obj,deg){
		var deg1=360*(deg/100) 
						
			if(deg<51){
				obj.html('<i class="rotate1" style="transform: rotate('+deg1+'deg);-webkit-transform: rotate('+deg1+'deg);"></i><i class="rotate2" style=" background:#fff"></i>') 
			}else{
				obj.html('<i class="rotate3"></i><i class="rotate4" style="transform: rotate('+deg1+'deg);-webkit-transform: rotate('+deg1+'deg);"></i>')
			}
	}
</script>
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

雪狼之夜

打个赏,让博主知道博文没白写

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值