【发布时间】:2022-01-15 21:53:22
【问题描述】:
我正在使用 react module.css,而我的外部类有一个 rgba,它使不透明度略微变灰。问题是,我不希望它应用于正在发生的内部类。
JSX
import styles from "./Join_popup.module.css";
function Join_popup(props) {
return (
<div>
<div className={styles.outer}>
<div className={styles.inner}>HELLO</div>
</div>
</div>
);
}
export default Join_popup;
CSS
.outer {
width: 100vw;
height: 100vh;
opacity: 50%;
background-color: rgba(178, 190, 177, 0.6);
position: fixed;
top: 0%;
left: 0%;
display: flex;
justify-content: center;
align-items: center;
}
.inner {
position: relative;
background-color: black;
width: 400px;
height: 500px;
opacity: 1;
border-radius: 5%;
}
【问题讨论】: