提交 f0ed8fdd 编写于 作者: 雪洛's avatar 雪洛

docs: 更新z-index文档

上级 70d82b55
...@@ -32,8 +32,6 @@ root ...@@ -32,8 +32,6 @@ root
<!-- CSSJSON.z-index.defaultValue --> <!-- CSSJSON.z-index.defaultValue -->
在uni-app x 4.11以前,web平台的默认值为auto。从4.11+,web平台与app拉齐,默认值统一为0。
<!-- CSSJSON.z-index.unixTags --> <!-- CSSJSON.z-index.unixTags -->
<!-- CSSJSON.z-index.compatibility --> <!-- CSSJSON.z-index.compatibility -->
...@@ -52,7 +50,7 @@ web端在**没有其他会产生层叠上下文的属性干扰时**不会创建 ...@@ -52,7 +50,7 @@ web端在**没有其他会产生层叠上下文的属性干扰时**不会创建
```vue ```vue
<template> <template>
<view style="z-index: 0;"> <view style="z-index: 0;flex: 1;">
<view> <view>
<view id="view-1-1" class="square" style="z-index: 4;background-color: aqua;"></view> <view id="view-1-1" class="square" style="z-index: 4;background-color: aqua;"></view>
<view id="view-1-2" class="square" style="z-index: 1;background-color: red;margin-top: -90px;margin-left: 10px;"></view> <view id="view-1-2" class="square" style="z-index: 1;background-color: red;margin-top: -90px;margin-left: 10px;"></view>
...@@ -84,7 +82,7 @@ web端对`position: fixed;`的元素设置z-index,此元素仍会在所属的 ...@@ -84,7 +82,7 @@ web端对`position: fixed;`的元素设置z-index,此元素仍会在所属的
```vue ```vue
<template> <template>
<view style="z-index: 0; flex: 1;"> <view style="z-index: 0;flex: 1;">
<view> <view>
<view id="view-1-1" class="square" style="z-index: 4;background-color: aqua;"></view> <view id="view-1-1" class="square" style="z-index: 4;background-color: aqua;"></view>
<view id="view-1-2" class="square view-1-2" style="z-index: 1;background-color: red;"></view> <view id="view-1-2" class="square view-1-2" style="z-index: 1;background-color: red;"></view>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册