在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