Css progressbar chrome的样式问题
我有一个html程序,它有一个进度元素。它在firefox中变为蓝色,但在chrome中不工作,它变为绿色,这是我不想要的。我的代码Css progressbar chrome的样式问题,css,google-chrome,progress,Css,Google Chrome,Progress,我有一个html程序,它有一个进度元素。它在firefox中变为蓝色,但在chrome中不工作,它变为绿色,这是我不想要的。我的代码 进展{ 颜色:#0063a6; 字体大小:.6em; 线高:1.5em; 文本缩进:.5em; 宽度:30em; 高度:3em; 边框:1px实心#0063a6; 背景:#fff; } 你需要做两件事。首先将progressbar的样式重置为其默认值,然后使用特定于浏览器的伪类将外观作为目标,如下所示: progress { -webkit-appear
进展{
颜色:#0063a6;
字体大小:.6em;
线高:1.5em;
文本缩进:.5em;
宽度:30em;
高度:3em;
边框:1px实心#0063a6;
背景:#fff;
}
你需要做两件事。首先将progressbar的样式重置为其默认值,然后使用特定于浏览器的伪类将外观作为目标,如下所示:
progress {
-webkit-appearance: none;
appearance: none;
}
progress::-webkit-progress-bar {
background-color: #eee;
border-radius: 2px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) inset;
}
使用背景图像对条形图本身进行样式设置:
progress[value]::-webkit-progress-value {
background-image:
-webkit-linear-gradient(-45deg,
transparent 33%, rgba(0, 0, 0, .1) 33%,
rgba(0,0, 0, .1) 66%, transparent 66%),
-webkit-linear-gradient(top,
rgba(255, 255, 255, .25),
rgba(0, 0, 0, .25)),
-webkit-linear-gradient(left, #09c, #f44);
border-radius: 2px;
background-size: 35px 20px, 100% 100%, 100% 100%;
}
请在此处阅读全文: