溢出-y:auto和overflow-x:在同一时间可见? [英] Overflow-y: auto and overflow-x: visible in the same time?

查看:261
本文介绍了溢出-y:auto和overflow-x:在同一时间可见?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为div添加此属性:

I'd like to put this properties for a div:

.content {
position: relative;
overflow-y : auto;
overflow-x: visible;
}

根据此页,如果一个指定为visible,另一个为scroll或auto,则visible设置为auto 。所以似乎不可能同时使用overflow-y:auto和overflow-x:visible。

According to this page, if one is specified as 'visible' and the other is 'scroll' or 'auto', then 'visible' is set to 'auto'. So it's seem to be impossible to use simultaneously an overflow-y:auto and an overflow-x:visible.

但是,我需要为网站设置这个属性,有办法吗?

However, I need to put this properties for a website, is there a way to do it ?

Vanessa 找到她自己的答案。这里是:

Vanessa found the answer by her own. Here it is:

OK,我修复了问题:)如果任何人有这种问题:不要忘记删除父的相对位置元素(这具有overflow属性):absolutive div将根据具有相对位置的父div放置。如果不是,它将根据身体放置!评论时间70年01月01日原作者:Vanessa

OK, I fixed the problem :) If anyone has this kind of problems : don't forget to remove the relative position of the parent element (this which have the overflow property) : the absolutive div will be placed according the parent div which have the relative position. If not, it will be placed according to body ! – Vanessa Jan 19 '12 at 5:38

推荐答案

Vanessa http://stackoverflow.com/users/1151236/vanessa 说OK,我修复了问题:)如果任何人有这种问题:不要忘记删除父元素的相对位置(这具有overflow属性):absolutive div将根据具有相对位置的父div放置,如果没有,它将根据body放置

Vanessa http://stackoverflow.com/users/1151236/vanessa says "OK, I fixed the problem :) If anyone has this kind of problems : don't forget to remove the relative position of the parent element (this which have the overflow property) : the absolutive div will be placed according the parent div which have the relative position. If not, it will be placed according to body ! "

这篇关于溢出-y:auto和overflow-x:在同一时间可见?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆