我遇到了一个我无法解决的问题,当我添加Position:relative;
到一个 div 时,它会出现一个白色边框,或者像图像中的额外空间
如果我删除 Position:relative;
边框移动到也有的父级, Position:relative;
这仅在 IE8 上。标记:
<div class="content clearfix">
Some content goes here
<div class="block">
<div class="block_content" style="display: block;">
Some content goes here
</div>
</div>
</div>
CSS:
.content {
min-height: 100%;
height: 100%;
position: relative;
width:100%;
background-color:#ebebeb;
}
.block_content {
display:none;
position:relative;
margin: 25px 20px 15px 20px;
}
.block{
overflow:hidden;
width:58%;
padding-bottom:60px;
float:right;
position:relative;
margin-right:10%;
background: rgb(222,222,222); /* Old browsers */
background: -moz-linear-gradient(top, rgba(222,222,222,1) 0%, rgba(255,255,255,1) 0%, rgba(222,222,222,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(222,222,222,1)), color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(222,222,222,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(222,222,222,1) 0%,rgba(255,255,255,1) 0%,rgba(222,222,222,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(222,222,222,1) 0%,rgba(255,255,255,1) 0%,rgba(222,222,222,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(222,222,222,1) 0%,rgba(255,255,255,1) 0%,rgba(222,222,222,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(222,222,222,1) 0%,rgba(255,255,255,1) 0%,rgba(222,222,222,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#dedede',GradientType=0 ); /* IE6-9 */
box-shadow: 6px 6px 14px #333333;
-moz-box-shadow:6px 6px 14px #333333;
-webkit-box-shadow: 6px 6px 14px #333333;
}
演示链接:http ://bank.benseno.com.tr/Sunus.html 任何帮助表示赞赏