首页 \ 问答 \ 溢出:当position:absolute时隐藏不起作用(Overflow: hidden not working when position: absolute)

溢出:当position:absolute时隐藏不起作用(Overflow: hidden not working when position: absolute)

我正在尝试构建一个UI组件,其构思是具有2个重叠的部分(第一个必须覆盖第二个)并使用可拖动元素扩展第一个。 我正在为您提供演示:

http://codepen.io/LazarGeorgiev/pen/yOPbmx

问题是,当我调整第一个元素的大小时,我希望元素不重新定位,为了实现这个,我使用position:absolute; 这显然是我的overflow:hidden;

我检查了StackOverflow上的一些帖子,我应该使用position:relative; 在一个外部的<div>元素,这在这里不起作用,因为它刹车position:absolute;

所以我的问题是如何在调整大小时将其隐藏而不重新定位内部元素。

PS最里面的<div>.the-content而外部是.first


I am trying to build a UI component which's idea is to have 2 overlapping sections (the first one has to cover the second) and to expand the first one with a draggable element. I am providing you with a demo:

http://codepen.io/LazarGeorgiev/pen/yOPbmx

The problem is that I want the elements not to reposition when I resizing the first element and in order to achieve this I use position:absolute; which apparently brakes my overflow:hidden;

I checked some posts on StackOverflow where I should use position:relative; on an outer <div> element, which doesn't work here, because it brakes the position:absolute;

So my question is how to make it hide when resizing without repositioning the elements inside.

P.S. the innermost <div> is .the-content and the outer is .first


原文:https://stackoverflow.com/questions/36421332
更新时间:2021-12-18 13:12

最满意答案

不,除了使用cleartool命令之外,我没有看到任何明显的方法来创建视图。
这个老例子实际上是使用IClearCase ...来获取Cleartool

ClearCase.ClearTool CT = new ClearCase.ClearTool();
string result;
result = CT.CmdExec("mkview -tag " + ViewName + " -stgloc -auto");

No I didn't see any obvious way to create a view other than using a cleartool command.
This old example is actually using IClearCase... to get Cleartool:

ClearCase.ClearTool CT = new ClearCase.ClearTool();
string result;
result = CT.CmdExec("mkview -tag " + ViewName + " -stgloc -auto");

相关问答

更多
  • 你可以做的是强迫Jenkins启动它需要使用的视图。 这可以通过“ cleartool startview ”命令完成。 您只需要指定要在需要使用视图的作业开头处开始的视图标记,例如, cleartool startview What you can do is force Jenkins to start the view it needs to use. This can be done with the "cleartool startview" command. You ju ...
  • 创造,也许不是。 但ClearCase插件允许使用现有的动态视图。 (可选)您可以使用现有的动态视图,而不是新的快照视图。 为此,请选中高级选项下的“使用动态视图”。 View root 动态视图使用所必需的 - 这是动态视图所在的目录或驱动器。 在Unix上,这通常是“/ view”,而在Windows上,它通常是“M:\”。 Do Not Reset Config Spec 如果选中,则不会更改动态视图的配置规范,无论它是否与作业配置中指定的配置规范匹配。 插件本身在hudson.plugins.c ...
  • 不支持正则表达式。 您可以使用cleartool lstype -fmt "%n %u\n" -kind brtype ,但您仍需要解析结果以获取您创建的分支。 使用fmt_ccase选项,您可以显示分支的创建者和名称,以供您解析。 There is no support for regular expression. You can list branches with a cleartool lstype -fmt "%n %u\n" -kind brtype, but you would still ...
  • 事情是,一个观点并不指向一个分支。 它仅在配置规范中组合了各种元素选择规则,这使得它在给定的时间对给定的树/文件反映了分支上的版本。 看到: 你将如何从ClearCase的特定分支中选择版本? 作为一个具体的例子。 如何最好地在Clearcase中分支? 了解分支机构的工作方式。 另请参阅关于选择组合选择与选择的辩论,以便更好地理解为什么默认情况下,ClearCase配置规范不需要引用一个分支。 检查当前分支的简单方法是: cd /my/view/path/to/relevant/directory cle ...
  • 如果你可以执行cleartool命令,你会建议使用cleartool chstream的基线: cleartool chstream -nc -recommend BL1@/vobs/pop_pvob 推荐基线的规则 如果基线来自流或流的基础,则可以为流建议基线。 对于不是来自流或流的基础的基线,以下规则适用: 基线必须是流的基础基线的祖先,并且必须在与基础基线相同的流上创建。 基线必须包含在流中,这意味着基线已传递到流,或者流已重新定位到基线或其后代之一。 基线必须包含当前建议的基线,这意味着它必须是 ...
  • viewname.x.vws是视图存储的命名约定,用于重复使用其标记的视图。 在客户端未删除视图的情况下,但仅在视图服务器端删除(即“ cleartool unregister ”,后跟“ cleartool rmtag ”): ClearCase的视图基本消失,但其客户端视图存储(现在无用)仍然存在。 (这就是Trent Fisher在他对Hudson ClearCase插件页面的 评论中所说的) 在此方案中,您可以通过重用前一个视图标记来重新创建视图,但是,由于相应的视图存储仍然存在,因此会创建一个新的 ...
  • 我看到使用ClearCase和TeamCity的唯一设置是使用由我的同事Gilles Philippart开发的TCC(TeamCity ClearCase插件): TCC GitHub repo :如最近的提交所示 ,它基于快照视图。 我没有很多关于设置的细节,但它适用于TeamCity6.x 。 The only setup I saw working with ClearCase and TeamCity is by using the TCC (TeamCity ClearCase plugin) ...
  • 尝试更改这些行: $ct.CmdExec("lsview $ViewName") $ct.CmdExec("mkview -tag $ViewName -nsh $ViewFullpath") 使用' $variable '返回字符串$ variable使用" $variable "将值asign返回给变量。 告诉你,在你的代码中,你也可以改变这个: $ViewFullpath="$ccViews$ViewName.vws" Try change these lines: $ct.CmdExec(" ...
  • 不,除了使用cleartool命令之外,我没有看到任何明显的方法来创建视图。 这个老例子实际上是使用IClearCase ...来获取Cleartool : ClearCase.ClearTool CT = new ClearCase.ClearTool(); string result; result = CT.CmdExec("mkview -tag " + ViewName + " -stgloc -auto"); No I didn't see any obvious way to create ...
  • 对于快照视图,您可以安全地重命名根目录。 但对于任何视图(快照或动态),请检查cleartool mkview -view -replace 。 它应该允许您替换标记,有效地重命名您的视图。 确保您的视图先停止( cleartool endview -server yourView ) -rep/lace 用新条目替换现有标记注册表项。 (如果标签不存在,则不会发生错误。) 您可以使用此选项更改标记注释和访问路径。 您不能使用-replace更改现有标记的名称; 为此,请使用mktag删除标记,然后使用m ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。