React Native - View disappears when position is absolute on Android

前端 未结 6 1361
温柔的废话
温柔的废话 2021-02-14 08:04

Whenever I made the position style \'absolute\' for this view, it disappears. I have no idea why it is happening.

import React, { Component } from \'react\';
imp         


        
6条回答
  •  我在风中等你
    2021-02-14 08:30

    It looks like z-index works from top to bottom.

    Without setting the zIndex manually, your absolutely positioned component should be lower in order of appearance/line number in your code for it to layer over the content below it.

    so

    then

    and not the other way around.

提交回复
热议问题