Twitter bootstrap Twitter引导中的自定义对象
对于一个容器,我有以下CSS,该容器假定位于给定位置的图像顶部:Twitter bootstrap Twitter引导中的自定义对象,twitter-bootstrap,Twitter Bootstrap,对于一个容器,我有以下CSS,该容器假定位于给定位置的图像顶部: .jumbotron .container { position: absolute; right: 0; bottom: 0; left: 0; top:75px; } .jumbotron .caption{ position: static; max-width: 750px; padding: 10px; margin-bottom: 200px;
.jumbotron .container {
position: absolute;
right: 0;
bottom: 0;
left: 0;
top:75px;
}
.jumbotron .caption{
position: static;
max-width: 750px;
padding: 10px;
margin-bottom: 200px;
background: rgba(51, 51, 51, 0.65) !important;
margin-top: 50px;
}
这将在示例站点上创建以下内容:
你所看到的是巨大的巨磁龙图像,上面有一个不透明的正方形。向下调整屏幕大小,使菜单进入移动友好状态,一切看起来都相对良好,现在打开菜单
不透明正方形不会随图像向下移动,而是停留在一个位置。如何使其随图像移动并保留其原始位置?将
位置:相对添加到特定的jumbotron