Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WaterMark 水印 全局变量--adm-water-mark-z-index 和CSS 变量--z-index失效 #6329

Closed
liangskyli opened this issue Aug 21, 2023 · 4 comments · Fixed by #6330
Closed
Labels

Comments

@liangskyli
Copy link
Contributor

Version of antd-mobile

5.32.0

Operating system and its version

No response

Browser and its version

No response

Sandbox to reproduce

https://codesandbox.io/s/flamboyant-mclean-snlzc8?file=/demo1.less

What happened?

WaterMark 水印 全局变量--adm-water-mark-z-index 和CSS 变量--z-index失效
image

Relevant log output

No response

@liangskyli liangskyli added the bug label Aug 21, 2023
@liangskyli
Copy link
Contributor Author

原因:组件没用设置zIndex,css变量优先级被这个覆盖了
image
image

@1587315093
Copy link
Contributor

参考下https://ant-design-mobile.antgroup.com/zh/components/picker 的css变量使用方法

@liangskyli
Copy link
Contributor Author

参考下https://ant-design-mobile.antgroup.com/zh/components/picker 的css变量使用方法

不就是下面,这两个使用方法吗?这两个都不生效啊

 <WaterMark
    content={'Ant Design Mobile'}
    style={{
      '--adm-water-mark-z-index': 2020,
    }}
  />
 <WaterMark
    content={'Ant Design Mobile'}
    style={{
      '--z-index': 2020,
    }}
  />

@liangskyli
Copy link
Contributor Author

加了一个例子:https://codesandbox.io/s/dazzling-bhaskara-24qh88

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants