效果图:
源码:
<div style="height: 1500px;"></div>
<div class="software-box">
<div class="software-container" style="display: flex;">
<div class="software-left" style="background-color: pink;width: 50%;height: 200px;">
</div>
<div class="software-right" style="background-color: skyblue;width: 50%;height: 200px;">
</div>
</div>
</div>
<style>
/* donghua */
.software-left,
.software-right {
opacity: 0;
transform: translateX(-100%);
/* 左边的模块初始位置在屏幕左侧外 */
transition: transform 1s ease, opacity 1s ease;
}
.software-right {
transform: translateX(100%);
/* 右边的模块初始位置在屏幕右侧外 */