gpt4 book ai didi

html - CSS 中的用户配置文件状态

转载 作者:太空宇宙 更新时间:2023-11-03 20:16:13 24 4
gpt4 key购买 nike

我正在尝试在我的网页中实现用户配置文件状态栏。为此,我做了以下工作:

<ul style="width:250px;background-color:#F5F5F5;">
<li style="width: 20%;background-color:#abb230;"/>
</ul>

对于这段代码,我得到以下结果:

enter image description here

所以在这里我想移除绿色条左侧的元素符号,并使绿色条向左齐平。

我试过这样做:

<ul style="width:250px;background-color:#F5F5F5;list-style:none;">
<li style="width: 20%;background-color:#abb230;"/>
</ul>

但这使得整个<ul>元素消失。

最佳答案

尝试:

ul {
width: 250px;
background-color: #F5F5F5;
list-style-type: none;
padding: 0;
}
li {
width: 20%;
background-color: #abb230;
height: 20px;
}

DEMO here.

关于html - CSS 中的用户配置文件状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20469973/

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