2009-12-03 79 views

回答

3

爲了使它在Safari中工作,似乎需要overflow:auto應用於div。

另外,div的顯示heightwidth將作爲min-heightmin-width

這隻適用於Safari瀏覽器,而不適用於Firefox 3.5。

<div id="box"> Nice box </div> 

CSS:

#box { 
    /* important */ 
    resize: both; 
    overflow: auto; 

    /* Styling */ 
    background: red; 
    position: absolute; /* per the question */ 
    top: 50px; 
    left: 50px; 
    width: 300px 
} 
+0

我知道沒有什麼,我試圖用這個來完成記憶,但感謝您的幫助!一些「粘滯便箋」相關我認爲... – arbales 2010-11-16 09:58:39

+0

如果內容是文字,這很有效。但是,我想將它用於OpenLayers的「地圖」對象(div)。當OSM地圖在div內繪製時,右下角的拇指被地圖覆蓋,我無法再用鼠標拖動它,並且我無法調整元素的大小。有沒有解決方案? – Yoichi 2013-12-13 09:20:25