Bug Tracker

Opened 6 years ago

Closed 6 years ago

#14455 closed bug (notabug)

2.0.3 z-index animate bug?

Reported by: informmanuel@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 2.0.3
Keywords: Cc:
Blocked by: Blocking:

Description

http://jsfiddle.net/MxAH2/7/

in chrome, $().css('z-index') returns 'auto'

z-index changes from 1 - animation (1, 0, 4) - animation (4, 0, -4)

Change History (2)

comment:1 Changed 6 years ago by informmanuel@…

JS Console query:

> $('DIV#testDiv2').css('zIndex')
  "auto"
> $('DIV#testDiv2').css('z-index')
  "auto"
> a = document.getElementById('testDiv2')
  [returned div element]​
> a.style.zIndex
  "-4"

comment:2 Changed 6 years ago by gibson042

Resolution: notabug
Status: newclosed

The computed value of z-index for non-positioned elements is "auto". Observe the difference: http://jsfiddle.net/MxAH2/8/

From http://www.w3.org/TR/CSS21/visuren.html#z-index:

Each positioned box in a given stacking context has an integer stack level

The root element forms the root stacking context. Other stacking contexts are generated by any positioned element (including relatively positioned elements) having a computed value of 'z-index' other than 'auto'

Note: See TracTickets for help on using tickets.