<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 6 年前。
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 6 年前。
这是指向相关页面的链接:
http://ollapodridawhatuneeda.com/video_viewer2.html
我想要视频查看器屏幕上方的空间,但到目前为止,向各种容器添加边距或填充只会导致将整个内容 div 向下推。我想让它在视频查看器上方保持蓝色,而不是白色。到目前为止,我只完成了将容器向下推,同时在其上方留下白色带,这不是我想要的效果。
有什么想法吗?
巴里·格里克
最佳答案
完成任务的一种方法是您可以添加:
padding-top: 100px;
对于<div id="content">
,所以你的新 CSS 看起来像:
#content {
width: 960px;
height: 1000px;
background: #9CC;
margin: 0 auto;
padding-top: 100px;
}
这会将视频容器向下推。
关于html - 如何在视频查看器上方添加空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38003714/