我们在生活中使用app的时候,经常遇到打开app的时候有一个3秒或者5秒的广告页,虽然有跳过按钮,但是仍然不太喜欢这个操作。实现的方法很简单,那么今天就分析模仿一下。
广告页
`
广告页 html, body { width: 100%; height: 100%; margin: 0; padding: 0; } #ad { width: 100vw; height: 100vh; position: relative; } #ad img { width: 100vw; height: 100vh; } #ad p { width: auto; padding: .1333rem .2667rem; color: #fff; position: absolute; top: .8rem; right: .5333rem; font-size: .3733rem; background-color: red; border-radius: .1067rem; }跳过3
$('#bigImg').attr('src', arr[index])
` ### 然后我们需要考虑跳转玩页面后用户不能返回上一个页面,这是我们就需要在下一个目标页做准备。在目标页面做一个禁止返回上个页面的操作。`
`