是否有可能为 html5 进度标签着色?
是否有可能在CSS中为进度标签着色?我试过了。但只有宽度和高度有效。我想要皮肤进度的颜色(显示下载百分比的内部颜色)。是否可以?
Is there any possibility to color the progress tag in css? I tried it. But only width and height is working. I want to skin the color of progression (inner color which shows the percentage of download). Is it possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这就是您正在寻找的:
它在 Chrome 和 < a href="https://developer.mozilla.org/en/CSS/::-moz-progress-bar" rel="nofollow noreferrer">Firefox 6。
IE10 还支持 ::-ms-fill伪元素。
This is what you are looking for:
It's working just fine on Chrome and Firefox 6.
IE10 also supports the ::-ms-fill pseudo-element.
目前没有。进度条的设计/外观目前由浏览器定义,CSS 无法设置进度条的样式。
我当前的解决方案是使用多个
div
来设置样式并显示进度条,并使用 CSS 精灵图像。Currently no. The design/look-and-feel of the progress bar is currently defined by the browser and CSS cannot style the progress bar.
My current solution to this is to use multiple
div
s to style and show a progress bar, using CSS sprite images.好吧,我会看看我能做些什么来提供帮助:/
我已经查看了进度标签的默认样式(它的 css 样式)(使用 Google Chrome 的 Inspect 元素选项),我发现以下内容(希望这有帮助) ):
Well I'll see what I can do to help :/
I have looked at the default style (the css style of it) of the progress tag (using Google Chrome's Inspect element option) and what I found is the following (hope this helps):
您不能在同一个选择器中混合使用 Mozilla 和 WebKit 前缀,您必须为两个渲染引擎创建完全独立的规则...
CSS
已测试Firefox 31 和 Chrome 37。使用 #f0f 因为它应该很容易被发现,除非配色方案存在根本性(可能是心理)问题。
You can NOT mix Mozilla and WebKit prefixes in the same selector, you must create completely separate rules for both rendering engines...
CSS
Tested in Firefox 31 and Chrome 37. Using #f0f because it should be easy to spot unless there are fundamental (and probably psychological) issues with the color scheme.