想要修复联系表格,直到我们进入该特定部分
want to fix contact form till we are in that particular section
enter image description here
想要修复右侧表格,直到我们进入该特定部分(课程课程)。
任何形式的帮助将不胜感激。
你可以使用CSS sticky 属性
的帮助
<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>
enter image description here
想要修复右侧表格,直到我们进入该特定部分(课程课程)。 任何形式的帮助将不胜感激。
你可以使用CSS sticky 属性
的帮助<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>