html - 如何做一个全屏背景滚动组件
问题描述
我试图弄清楚如何设置具有多个背景的全屏登录页面。我希望用户能够滚动一次并让下一个背景占据整个屏幕。我还想跟踪用户在登录页面的哪个部分,类似于右侧的位置跟踪器。
我正在尝试在此页面上模仿设计https:// purpose.nike.com/ 一个人将如何做到这一点?
解决方案
If you want to achieve the wallpaper thing as nike as done you would have to add some transitions to make it look good. To achieve it add the background to each div you want and add following css.
.bg{
height: 100vh;
width: 100vw; }
.bg_url1 { background: url1 }
.bg_url2 { background: url2 }
<div class="bg bg_url1"/>
<div class="bg bg_url2"/>
add this to each wallpaper then you can combine it with javascript/jquery to add transitions to make it look good.
推荐阅读
- python - 使用python将现有的子属性值替换为子标记值
- javascript - 如何使用 Parcel 从 TypeScript 文件中导入非 TypeScript 资产
- sql - 从参数值中选择 SQL 列
- r - HighCharter HCAES 方法在 R Shiny Dashboard 中不产生任何可视化
- google-cloud-firestore - 仅通过云功能在 Firestore 中读写
- java - Java:如何以更快的方式从 TB 大小的文件中计算行数
- matlab - 如何有效地做一个托普利茨矩阵matlab
- python - 从 Sklearn 管道中提取具有特征名称的特征重要性
- python - celery 任务因 dlib cnn 人脸检测而失败
- javascript - 在隐身模式下运行 Chrome 时,JavaScript 源映射是否会受到影响?