在HTML中,我愿做这样的事情:CSS3饼图可变比例
<div class="thermometer">
<div class="circle purple">
<div class="pie-piece percent=75%">
</div>
</div>
</div>
其中结果将是一个填充了75%,在紫色的圆。 (同样的事情,比萨饼切成4块,和一件丢失)(75来自数据库,并且不能在CSS)
我的圈子CSS是这样的:
.thermometer .circle {
position: absolute;
width:26px;
height:26px;
-moz-border-radius:13px;
-webkit-border-radius:13px;
border-radius:13px;
border: 1px solid #000000;
}
.thermometer .green { background-color: green; }
(other colors)
我使用“hold”和“clip”属性来查看示例,但不知道如何使用变量进行操作。我怎样才能为“饼”写CSS?
非常感谢!现在我有一个稍微不同的问题 - 关于将JQuery调用与类匹配。我将在一个单独的问题中发布。这工作很好! – sploiber