gpt4 book ai didi

html - 进度条高度变化

转载 作者:行者123 更新时间:2023-11-28 15:24:17 27 4
gpt4 key购买 nike

此进度条按预期工作,但未应用 css。它需要显示由 javascript 设置的内部白色文本。

我得到的只是细长的进度条,因此高度属性不起作用。有什么建议么?谢谢

#bar {
width: 100%;
height: 1.5rem;
text-align: center;
color: white;
}
<progress id="bar" value="0" max="70"></progress>

最佳答案

添加-webkit-appearance: none; -moz-外观:无;外观:无;如下:

#bar {
width: 100%;
height: 5.5rem;
text-align: center;
color: white;
background-image: green;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
<progress id="bar" value="20" max="70"></progress>

关于html - 进度条高度变化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45561469/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com