我尝试使用响应式 CSS 在移动设备上呈现页面。 我无法更改 html,我尝试仅使用 css 来解决我的问题。
想象一下我有一个这样的 div :
#example {
width : 25px;
height : 25px;
}
在这个 div 中,我有一个 1024*768 的图像。 所以内容比contener更大(我会展示所有内容) 我的问题是以下内容将放置在顶部 25px 处,而不是图像下方。
编辑:一个新的 jsfiddle,更精确:http://jsfiddle.net/eABu5/12/
你有什么想法吗? 非常感谢
最佳答案
CSS
#example {
width : 250px;
height : 250px;
background-color : #123456;
}
#pic {
margin-top: 250px;
float: left;
}
#under {
margin-top: 10px;
float: left;
}
关于css - 当内容大于 div1 的大小时放置 div2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19465808/