Html 带有图像CSS的内部Div
具有下列特征:Html 带有图像CSS的内部Div,html,css,responsive,Html,Css,Responsive,具有下列特征: <div class="big-container"> <div class="header">many things here that must be fixed on top of the page</div> <div class="content"> <img src="image"/> <!--Must expand the content div to the siz
<div class="big-container">
<div class="header">many things here that must be fixed on top of the page</div>
<div class="content">
<img src="image"/> <!--Must expand the content div to the size of the image -->
<div class="footer"> Must be inside the image but at the bottom</div>
</div>
</div>
<!-- .content and .header must be at the same top, .content is much higher than header-->
这里有很多东西必须固定在页面顶部
必须在图像内部,但在底部
我尝试使用相对和绝对,但页面响应迅速,我无法设置.content的高度
什么是css?你不能不尝试就要求代码。检查下面的代码。这可能会有帮助
.header{
背景:红色;
宽度:100%;
位置:固定;
排名:0;
}
.内容{
边缘顶部:30px;
位置:相对位置;
最小宽度:300px;
最大宽度:500px;
}
.内容img{
位置:相对位置;
高度:300px;
宽度:100%;
}
.content.footer{
背景:灰色;
位置:绝对位置;
宽度:100%;
底部:0px;
}
这里有很多东西必须固定在页面顶部
必须在图像内部,但在底部
这里有很多东西-在哪里?请提供更多信息。可能一个寻求代码帮助的问题必须包含在问题本身中重现它所需的最短代码,最好是在。看见