2011-01-06 63 views
3

我創建一個日曆和需要複製的行爲我會替代溢出-y在CSS中?

overflow-x:visible; 
overflow-y:hidden; 

這應該是不支持這些CSS屬性的瀏覽器。我能做些什麼解決方法?我不只是想妥協和添加溢出:這些瀏覽器隱藏,因爲客戶端真的想要這個功能。有沒有人有任何好主意?

非常感謝。

+5

它們在Internet Explorer 6.x +,Firefox 1.5 +,Safari,Chrome和Opera 9.5+中受支持。還有其他廣泛使用的瀏覽器不支持它們嗎? – 2011-01-06 19:49:44

回答

4

這裏有人問了大致相同的問題(overflow-x visible和-y hidden)。
http://forums.devnetwork.net/viewtopic.php?f=68&t=116457

有人叫WeirdanI'd say there's isn't any expected behavior because such style is unavoidably internally inconsistent,並給出了一個例子,其中也不清楚(說Weirdan)區向東南是否應該被隱藏或顯示。

他/她還說the effect you want is easily achieved by wrapping the outer div with another div and setting overflow-y on that div to hidden,並顯示了這個例子(我希望它可以複製到這裏?)。

<style type="text/css"> 
#outer-wrapper { 
    overflow-y:hidden; 
} 
#outer { 
    width:100px; 
    height:100px; 
    background:red; 
    border:solid red 1px; 
    overflow:visible; 
} 
#inner { 
    width:200px; 
    height:200px; 
    background:green; 
}​ 
</style> 
<div id="outer-wrapper"> 
    <div id="outer"> 
    <div id="inner"></div> 
    </div> 
</div>