[英]JavaScript, CSS: Clip to be inside parent DIV
I have a bunch of nested DIVs (implementing a simple window system, for learning purposes, with DIVs). 我有一堆嵌套的DIV(实现一个简单的窗口系统,用于学习目的,使用DIV)。
Let divA = child of divB. 设divA = divB的子节点。
Now, ideally, I want the contents of divA to be "clipped" inside of divB. 现在,理想情况下,我希望divA的内容在divB中被“剪切”。
Thus, if I take divA, and drag it to the right ... as it gets out of the border of divB, I want the parts of divA that are outside of divB to be chopped off and not displayed. 因此,如果我使用divA,并将其向右拖动...当它离开divB的边界时,我希望divB之外的divA部分被切断而不显示。
How do I do this? 我该怎么做呢? How do I use one div to clip / mask another div? 如何使用一个div剪辑/屏蔽另一个div?
Thanks! 谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.