css下 让元素贴近容器的底部
div {width: 100px;height: 100px; background-color: gray;}table{width: 50px;height: 50px; background-color: lightgray; position: relative; bottom: -50px;//table.height - div_hei
·
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background-color: gray;
}
table{
width: 50px;
height: 50px;
background-color: lightgray;
position: relative;
bottom: -50px;//table.height - div_height
}
</style>
<body>
<div id="div_content">
<table><tr><td><td></tr><table>
</div>
</body>
</html>
效果图
更多推荐
已为社区贡献1条内容
所有评论(0)