因此,我正在为一个朋友的艺术网站日志编写代码,我的代码的一部分就是不能去掉一些空白/填充,我担心这些可能是主体中网站编码的一部分,所以我需要手动覆盖它。This is what I am working on.那本杂志皮肤。靠近底部的岩石应该与日志的边缘齐平,但无论我怎么尝试,它们就是不能满足我的要求。
这是我到目前为止的代码,并不是很多:
<div class="body">
<div class="header"></div>
<div class="contentholder"></div><div class="rockfooter"></div>
</div>以及:
.gr-body {
background: url(http://orig14.deviantart.net/8b57/f/2016/279/f/5/frontpagebackground_by_wulfghast-dak5apt.jpg);
background-size: 100%;
background-repeat: no-repeat;
background-color: #1c1119;
color: #545454; }
.header {
background-image: url(http://s10.postimg.org/bvl7xjjbd/branchborder.png);
background-position: top center;
background-repeat: no-repeat;
background-size: contain;
margin-left: auto;
margin-right: auto;
margin-top: 20%;
position: relative;
z-index: 2;
height: 873px;
width: 74%;
display: block; }
.contentholder {
width: 68%;
margin-left: auto;
margin-right: auto;
margin-top: -800px;
-moz-box-shadow: 0 0 20px 5px #0a0a0a;
-webkit-box-shadow: 0 0 20px 5px #0a0a0a;
box-shadow: 0 0 20px 5px #0a0a0a;
background-color: #50463b;
position: relative;
z-index: 1;
display: block; }
.rockfooter {
background: url(http://s17.postimg.org/is79jxd3z/footer3_by_wulfghast_dakd92b_1.png);
height: 1000px;
width: 100%;
background-position: bottom;
background-repeat: no-repeat;
background-size: contain;
margin-left: auto;
margin-right: auto;
margin-top: -985px;
position: relative;
z-index: 4; }
.bottom {
display: none; }发布于 2016-10-21 06:35:45
在你分享的那个页面上,你的摇滚
<div class=body>在一个
<div class=text>周围有填充物。
看看你能不能去掉那个垫子,它会让它和两边齐平。
发布于 2016-10-21 06:33:19
您可以使用以下命令重置常规定义:
* {
box-sizing: border-box;
margin: 0;
vertical-align: baseline;
}https://stackoverflow.com/questions/40165554
复制相似问题