我創建了一個簡單的圓環圖的小提琴:http://jsfiddle.net/4azpfk3r/217/CSS3圓環圖
我怎樣才能圓環圖有一個紅色的輪廓和填充是純紅色留下透明/紅比分/百分比概述百分比部分沒有得分?
CSS:
.background {
background: grey;
}
.item {
position: relative;
float: left;
}
.item h2 {
text-align:center;
position: absolute;
line-height: 125px;
width: 100%;
}
svg {
transform: rotate(-90deg);
}
.circle_animation {
stroke-dasharray: 440;
stroke-dashoffset: 440;
}
.html .circle_animation {
-webkit-animation: html 1s ease-out forwards;
animation: html 1s ease-out forwards;
}
.css .circle_animation {
-webkit-animation: css 1s ease-out forwards;
animation: css 1s ease-out forwards;
}
@-webkit-keyframes html {
to {
stroke-dashoffset: 80;
}
}
@keyframes html {
to {
stroke-dashoffset: 80;
}
}
好的,這使得線條變紅......但是我希望得分爲紅色,而整個甜甜圈帶有紅色輪廓。 –
@OamPsy你是說你想讓這個圈子一路走來嗎? – Mdalz
@OamPsy如果它解決了你的問題,請接受答案=) – Mdalz