如何将屏幕分成两半,如下所示:
以便在每个半部分中添加我的自定义元素?
例如:蓝色一侧是一张图片,第二侧包含一些随机文本输入。
我一直试图这样做:
![enter image description here](https://istack.dev59.com/vlm59.webp)
例如:蓝色一侧是一张图片,第二侧包含一些随机文本输入。
我一直试图这样做:
<div className={styles.splitScreen}>
<div className={styles.topPane}>
{topPane}
</div>
<div className={styles.bottomPane}>
{bottomPane}
</div>
</div>
使用包含以下内容的scss文件:
.splitScreen {
position: relative;
height: 100vh;
.topPane,
.bottomPane {
position: relative;
width: 100%;
height: 50%;
}
.topPane {
transform: rotate(180deg);
}
}
但是没有成功。