5
我想根據值爲一個進度條着色。在css3顏色中使用數據屬性
progress[value]::-webkit-progress-value {
position: relative;
background-color: rgba(0, attr(value) ,0,1);
background-size: 35px 20px, 100% 100%, 100% 100%;
border-radius:3px;
/* Let's animate this */
animation: animate-stripes 5s linear infinite;
}
看起來像attr(價值)似乎沒有工作 - 有沒有辦法在那裏注入價值?使用chrome
很多人的夢想,但在那一刻,'ATTR()'只能在'content'性能 - 參見[第二段](https://developer.mozilla.org/en/docs/網絡/ CSS/attr)使用。 – Scott
此外,:: - webkit-progress-value不是官方標準。 https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-progress-value –