想要修复右侧表格,直到我们进入该特定部分(课程表)。任何帮助将不胜感激。
您可以使用CSS粘性属性的帮助
<div class="form-container">
<div>other content</div>
<div class="form">form</div>
</div>
<div class="other-container">
</div>
<style>
.form-container{
height: 150vh;
background: #f1f1f1;
position: relative;
display: flex;
justify-content: space-between;
}
.form{
background: pink;
width: 30vw;
position: -webkit-sticky;
position: sticky;
right: 0;
top: 10vh;
height: 50vh;
}
.other-container{
height: 150vh;
}
</style>