gpt4 book ai didi

css - 对齐 block 元素的顶部

转载 作者:太空宇宙 更新时间:2023-11-04 15:31:31 26 4
gpt4 key购买 nike

我的 HTML5/CSS 呈现如下:http://imgur.com/0rixh

使用以下代码:

                <li>
<div class="name">Booger Jet.zip</div>
<progress max="100" value="60"></progress>
<div class="control"></div>
<div class="status">12 MB / 21 MB 240 kB/s</status>
</li>

#uploads li progress {
width: 317px;
margin-bottom: 4px;
}

#uploads li .control {
width: 14px;
height: 14px;
display: inline-block;
opacity: 0.6;
background-image: url('../img/stop_button.png');
}

如何垂直对齐它们?我有哪些选择?谢谢!

最佳答案

尝试一下

#uploads li progress {
width: 317px;
margin-bottom: 4px;
margin-top:1px; /* change it if you need more top sapce*/
}
#uploads li .control {
width: 14px;
height: 14px;
display: inline-block;
vertical-align:top;
opacity: 0.6;
background-image: url('../img/stop_button.png');
}

关于css - 对齐 block 元素的顶部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13324105/

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