-1

我目前在布局的一个部分遇到问题。

我的布局容器是白色的,带有圆角和阴影(效果很好)。

问题是,我在容器 div 中有一个浅灰色的页脚部分。我希望这个 div 的底角会随着容器变圆,但它们是方形的并且与容器 div 的圆角重叠。

有什么办法可以使页脚 div 的底角变圆?

这是我的CSS:

.container {
  clear: both;
  margin: 20px auto;
  width: 940px;
  background: #fff;
  -moz-border-radius: 10px;
  -khtml-border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
  -khtml-box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
  -webkit-box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
  position: relative;
  z-index: 90; /* the stack order: displayed under ribbon rectangle (100) */
  *zoom: 1;
}

.site-footer{
    padding-top: 10px;
    background: #f6f6f6;
}

HTML

<div class="containter">
   Test Text...
   <div class="site-footer">
      Footer text...
   </div>
</div>

这个问题可以在我的网站上查看

4

2 回答 2

2

添加overflow: hidden;到您的.container样式中。

CSS

.container {
    ...
    overflow: hidden;
    ....
}

演示

于 2013-07-29T00:51:13.763 回答
1

有什么办法可以使页脚 div 的底角变圆?

是的。

border-bottom-left-radius: /* */;
border-bottom-right-radius: /* */;
于 2013-07-29T00:59:05.467 回答