[英]How to create a translucent overlay using JavaScript in ReactJS?
In ReactJS project, I have an API request and once I make it, I would like to render a translucent overlay on the current webpage with Material UI's progress indicator ( http://www.material-ui.com/#/components/circular-progress )on top of the translucent overlay, and after I get a response back, would like for the translucent overlay with the progress indicator to go away. 在ReactJS项目中,我有一个API请求,一旦完成,我想用Material UI的进度指示器在当前网页上渲染一个半透明的覆盖层( http://www.material-ui.com/#/components/circular -progress ),然后返回响应后,希望带有进度指示器的半透明覆盖物消失。
How can I go about doing so? 我该怎么做呢? Any guidance or insight would be greatly appreciated. 任何指导或见解将不胜感激。 Thank you. 谢谢。
在React中,您可以使用backgroundColor
和RGBA
css,例如
<div style={{backgroundColor: 'rgba(0,0,0,0)'}}> ... </div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.