2011-01-06 57 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>