[英]How to change border-radius of progress bar value?
我無法更改HTML5 <progress>
元素值的border-radius。 我嘗試將一個邊界半徑應用於progress元素本身並progress[value]
,但這似乎沒有做任何事情。
這是我到目前為止: https : //jsfiddle.net/8m93Lorn/1/
有任何想法嗎?
為此,您需要這樣做:
看起來這些是重復的,但這實際上確保它適用於所有瀏覽器
progress {
border: 0;
height: 40px;
border-radius: 20px;
}
progress::-webkit-progress-bar {
border: 0;
height: 40px;
border-radius: 20px;
}
progress::-webkit-progress-value {
border: 0;
height: 40px;
border-radius: 20px;
}
progress::-moz-progress-bar {
border: 0;
height: 40px;
border-radius: 20px;
}
希望這可以幫助!
在我的chrome作品中使用此代碼
progress[value]::-webkit-progress-bar {
background-color: #ededed;
border-radius: 40px;
}
progress[value]::-webkit-progress-value {
border-radius: 40px;
background-color:lightblue;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.