HTML停靠到底部
我有以下HTML:HTML停靠到底部,html,css,alignment,vertical-alignment,dock,Html,Css,Alignment,Vertical Alignment,Dock,我有以下HTML: <div class="gallery-item"> <a href="ddd.pdf" style="display:block; width: 100%;"> <span id="filename_1" style="white-space: nowrap;">Hello</span> </a> <div id="commands"> <input type="tex
<div class="gallery-item">
<a href="ddd.pdf" style="display:block; width: 100%;">
<span id="filename_1" style="white-space: nowrap;">Hello</span>
</a>
<div id="commands">
<input type="text" readonly="readonly" value="https://blob">
<a href="sdfasdfasdfasdf">Delete</a>
</div>
</div>
我想将命令
div与库项
分类div的底部对齐。上述操作均无效,命令
将与前面的元素保持一致:
添加
位置:相对于父对象
.gallery项目{
位置:相对位置;
}
.gallery项#命令{
位置:绝对位置;
底部:1px;
}
当您使用position
ing时,您需要明确指定。Nops,正如您在右下角的平铺中看到的,文件名被修剪,它最初是“分析”。无论如何,我希望和我一起工作的秘书会考虑一下。顺便说一句,这是修剪功能。欢迎您发表评论!
.gallery-item {
border: 1px #AAA solid;
display: inline-block;
margin: 2px;
padding 2px;
width: 130px;
height: 90px;
text-align: center;
border-radius: 5px;
vertical-align: middle;
}
.gallery-item #commands {
line-height: 4px;
padding-bottom: 1px;
vertical-align: bottom;
bottom: 1px;
}