Language agnostic 无限长圆形矩形

Language agnostic 无限长圆形矩形,language-agnostic,Language Agnostic,基本上,我的目标是将页面内容div封装在一个圆形矩形中。有点像这样: Top of round rect (White) Page content (uses a white rectangular css background) Bottom of round rect(White) 因此,页面内容部分可以根据需要保留圆形矩形形状。我只是不确定最好的方法。我尝试在pagecontent div的顶部添加一个img,但是透明区域被pagecontent的背景覆盖了。谢谢这项著名的技术可能正是

基本上,我的目标是将页面内容div封装在一个圆形矩形中。有点像这样:

Top of round rect (White)
Page content (uses a white rectangular css background) 
Bottom of round rect(White)

因此,页面内容部分可以根据需要保留圆形矩形形状。我只是不确定最好的方法。我尝试在pagecontent div的顶部添加一个img,但是透明区域被pagecontent的背景覆盖了。谢谢

这项著名的技术可能正是你所需要的。您可能需要添加额外的重复图像以使其无限长。

如果我理解您的意思,您应该将顶部和底部div放在内容div之外:

<html>
<div id=top>&nbsp;</div>
<div id=middle>

... insert page content ...

</div>
<div id=bottom>&nbsp;</div>
</html>

... 插入页面内容。。。
然后在css中

#top {
 background : url("top.png") no-repeat bottom center;
 height : <height of image in pixels>px;
 padding : 0;
 margin: 10px auto 0 auto;
 width:<required width>
}

#middle {
 background : url("middle.png") repeat-y top center;
 padding : 0;
 margin: 0 auto 0 auto;
 width:<required width>
}

#bottom {
 background : url("bottom.png") no-repeat top center;
 height : <height of image in pixels>px;
 padding : 0;
 margin: 0 auto 10px auto;
 width:<required width>
}
#顶部{
背景:url(“top.png”)没有重复的底部中心;
高度:px;
填充:0;
保证金:10px自动0自动;
宽度:
}
#中间的{
背景:url(“middle.png”)repeat-y上中;
填充:0;
边距:0自动0自动;
宽度:
}
#底部{
背景:url(“bottom.png”)没有重复的顶部中心;
高度:px;
填充:0;
保证金:0自动10px自动;
宽度:
}

我看到doctype.com上已经有了这条消息,我在那里没有得到答案,在谷歌上也找不到这条消息的任何内容