2013-07-04 40 views
0

我想有圍繞整個HTML頁面有點像photo frame圖像邊界在IE7及以上

邊框有一個solution但它不工作,爲IE7 + 任何人有什麼想法?

編輯1

感謝您的答覆,我想我沒有解釋清楚我的問題。我已經包含了樣本設計

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

基本上它是圍繞頁面

編輯2

我添加了一個fiddlejs這是我從@Sebastian格拉茨得到的,其框架幾乎在那裏,但框架需要填充的內容不是唯一的窗口

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; } 
+0

它可能看起來stupide,但爲什麼不使用身體的背景顏色和「邊框顏色」,並設置體填充,以你期望的邊框的大小。然後,所有你需要添加的是一個額外的兒童標籤,以包含所有的內容,像一個「較小的身體」 –

+0

謝謝,但我不認爲它會工作,但我已經更新我的入口請檢查 – badcoder

回答

0
body { 
    border:50px solid orange; 
} 

這是什麼意思?

+0

是不是一個堅實的邊界,框架必須有一個圖案或某種類型。 想象http://1.bp.blogspot.com/-6ncmIY0j4uQ/T9TAs4V4-XI/AAAAAAAADj0/X8FrUj53CQA/s320/FlowerFrame6.png整個頁面各處 – badcoder

0

DEMO: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; } 
+0

感謝您的答覆,但它可以添加到圖案邊框?我認爲邊界框僅適用於維度規則。我已經更新了我的入口請檢查 – badcoder

+0

是的確 - 檢查我的小提琴:http://jsfiddle.net/umbriel/xzqDQ/如果您希望更好地控制背景的位置,您可以創建4個獨立的圖像文件並添加他們到頂部,左側,右側,底部divs據此 –

+0

謝謝,是的,我也試過,但問題是當內容很長時,框架剛剛卡在那裏http://jsfiddle.net/xzqDQ/1/ – badcoder