z-index

Handling click events on z-index'd layers

时光毁灭记忆、已成空白 提交于 2019-12-17 20:09:16
问题 I have 2 z-index layers in a map application I'm building. I have a problem when I click on the layers to zoom in. The click handler is on the underlying z-index layer and I don't want it to fire when a control in the overlying layer is clicked. The problem i have is that the event gets raised no matter what but the originalTarget property of the event is not the image in the underlying layer when something on the top layer is clicked. Is there anyway to change this? 回答1: It's called event

FF3/Windows CSS z-index problem with YouTube player

折月煮酒 提交于 2019-12-17 17:25:49
问题 I'm stuck on what appears to be a CSS/z-index conflict with the YouTube player. In Firefox 3 under Windows XP, Take a look at this page: http://spokenword.org/program/21396 Click on the Collect button and note that the pop-up <div> appears under the YouTube player. On other browsers the <div> appears on top. It has a z-index value of 999999. I've tried setting the z-index of the <object> element containing the player to a lower value, but that didn't work. Any idea how to get the pop-up to

z-index in css doesn't work

我怕爱的太早我们不能终老 提交于 2019-12-17 16:28:39
问题 This div <div style="position: relative; z-index: 99;">123</div> is shown above than this one <div style="position: fixed; z-index: 3000;">456</div> When i assign z-index: 98 in first div everything's fine! I can provide more code if needed. 回答1: On this fiddle it isn't: http://jsfiddle.net/kcgCX/ I think it must be something else in your code that changes. it. 回答2: z-index is orienting at it's parent - are they both in the same parent-element? z-index implements an own stack - for example:

Float a div above page content

我的梦境 提交于 2019-12-17 10:46:55
问题 I've implemented a popup box that dynamically displays search options. I want the box to "float" above all of the site content. Currently, when the box is displayed it displaces all of the content below it and looks bad. I believe I've already tried setting the z-index of the box's div to above that of the remaining page content, but still no luck. 回答1: You want to use absolute positioning. An absolute position element is positioned relative to the first parent element that has a position

How to find the highest z-index using jQuery

风流意气都作罢 提交于 2019-12-17 06:35:10
问题 I have a number of div elements with different z-index. And I want to find the highest z-index among these divs - how can I achieve it? CSS: #layer-1 { z-index: 1 } #layer-2 { z-index: 2 } #layer-3 { z-index: 3 } #layer-4 { z-index: 4 } HTML: <div id="layer-1">layer-1</div> <div id="layer-2">layer-2</div> <div id="layer-3">layer-3</div> <div id="layer-4">layer-4</div> I don't think this line can find the highest z-index though. var index_highest = parseInt($("div").css("zIndex")); // returns

css z-index issue with nested elements

不打扰是莪最后的温柔 提交于 2019-12-17 05:14:25
问题 I have 3 HTML elements that I want to order on the z plane: .bank { width: 200px; height: 200px; background-color: grey; position: absolute; z-index: 100; transform: translateY(10%); } .card { width: 100px; height: 100px; background-color: red; position: absolute; left: 50px; top: 50px; z-index: 300; } .button { width: 50px; height: 50px; background-color: green; position: absolute; left: 30px; top: 50px; z-index: 200; } <div class="bank"> bank <div class="card">card</div> </div> <div class=

I have position but z index is not working

让人想犯罪 __ 提交于 2019-12-17 03:44:50
问题 i want the outside ring to go behind the circle, but when I tried to use z-index its not working. not doing anything. I made 2 rings, one ring is on top of the circle without the top, the other one is behind the circle I just can't move it i don't know why. :root{ --size:200px; } #background { width:100%; height:100%; position:absolute; top:0; left:0; background: linear-gradient(-23.5deg, #000033, #00001a); z-index:-2; } #background #mainplanet { width:var(--size); height:var(--size);

IE7 Z-Index issue - Context Menu

折月煮酒 提交于 2019-12-17 03:19:38
问题 I have the following button with associated context menu <div class="control-action"> <button>Action</button> <ul style="display:none"> <li class="action-remove">Remove</li> <li class="action-detail">Detail</li> <li class="action-assigned">Assign</li> </ul> </div> When the button is clicked the associated ul shows beneath it as a context menu. This is working great on all browsers except IE 7. In IE7 the context menu (ul) shows beneath the button below it. I imagine this is likely due to how

How to set iPhone UIView z index?

北城余情 提交于 2019-12-17 02:02:31
问题 I want to move one view on top of another, how can I know the z index of the view, and how to move on to top? 回答1: UIView siblings are stacked in the order in which they are added to their superview. The UIView hierarchy methods and properties are there to manage view order. In UIView.h: @property(nonatomic,readonly) UIView *superview; @property(nonatomic,readonly,copy) NSArray *subviews; - (void)removeFromSuperview; - (void)insertSubview:(UIView *)view atIndex:(NSInteger)index; - (void

How to set iPhone UIView z index?

淺唱寂寞╮ 提交于 2019-12-17 02:02:26
问题 I want to move one view on top of another, how can I know the z index of the view, and how to move on to top? 回答1: UIView siblings are stacked in the order in which they are added to their superview. The UIView hierarchy methods and properties are there to manage view order. In UIView.h: @property(nonatomic,readonly) UIView *superview; @property(nonatomic,readonly,copy) NSArray *subviews; - (void)removeFromSuperview; - (void)insertSubview:(UIView *)view atIndex:(NSInteger)index; - (void