Google Chrome not respecting z-index

后端 未结 6 1482
后悔当初
后悔当初 2020-12-31 01:06

As per the title, it seems only Chrome isn\'t playign along. Note that form fields cannot be clicked on which are on the left portion of the screen. This only occurs on some

6条回答
  •  青春惊慌失措
    2020-12-31 01:17

    Usually when you have set the z-index property, but things aren't working as you might expect, it is related to the position attribute.

    In order for z-index to work properly, the element needs to be "positioned". This means that it must have the position attribute set to one of absolute, relative, or fixed.

    Note that your element will also be positioned relative to the first ancestor that is positioned if you use position: absolute and top, left, right, bottom, etc.

提交回复
热议问题