0

我正在尝试在整个 HTML 页面周围设置一个边框,例如相框

有一个解决方案,但它不适用于 IE7+ 有人有什么想法吗?

编辑 1

感谢您的回复,我想我没有清楚地解释我的问题。我已经包含了一个示例设计

https://dl.dropboxusercontent.com/u/604317/test.jpg

基本上它是围绕页面的框架

编辑 2

我添加了一个从@Sebastian Graz 获得的fiddlejs,它几乎就在那里,但框架需要填充内容而不是唯一的窗口

http://jsfiddle.net/xzqDQ/1/

#top, #bottom, #left, #right {
background: url('http://f.cl.ly/items/1P2Q1u0O2P44082N1L3a/Screen%20Shot%202013-07-04%20at%204.25.01%20PM.png');
position: fixed;
}
#left, #right {
    top: 0; bottom: 0;
    width: 30px;
    }
#left { left: 0; }
#right { right: 0; }

#top, #bottom {
    left: 0; right: 0;
    height: 30px;
    }
#top { top: 0; }
#bottom { bottom: 0; }
4

2 回答 2

0
body {
    border:50px solid orange;
}

你是这个意思吗?

于 2013-07-04T12:31:26.990 回答
0

演示:http: //jsfiddle.net/umbriel/xzqDQ/

CSS:

#top, #bottom, #left, #right {
background: url('http://f.cl.ly/items/1P2Q1u0O2P44082N1L3a/Screen%20Shot%202013-07-04%20at%204.25.01%20PM.png');
position: fixed;
}
#left, #right {
    top: 0; bottom: 0;
    width: 30px;
    }
#left { left: 0; }
#right { right: 0; }

#top, #bottom {
    left: 0; right: 0;
    height: 30px;
    }
#top { top: 0; }
#bottom { bottom: 0; }
于 2013-07-04T12:40:32.893 回答