html背景滚轮,CSS滚动背景变化

css

.content, .wrapper:before {

box-sizing: border-box;

display: block;

font-size: 4em;

padding: 1em;

width: 6em;

height: 3em;

position: fixed;

top: 50%;

left: 50%;

-webkit-transform: translate3d(-50%, -50%, 0);

transform: translate3d(-50%, -50%, 0);

}

.content {

font-weight: bold;

text-align: center;

z-index: 1000;

background: #fff;

color: #000;

mix-blend-mode: lighten;

}

section {

background-repeat: no-repeat;

background-size: cover;

isolation: isolate;

position: relative;

height: 100vh;

padding: 1em;

}

.wrapper {

clip: rect(auto auto auto auto);

position: absolute;

top: 0;

right: 0;

bottom: 0;

left: 0;

}

.wrapper:before {

content: " ";

padding: 2em 3.5em;

mix-blend-mode: darken;

}

.one {

background-image: url(https://unsplash.it/1920/1080?image=737);

}

.one .wrapper:before {

background: red;

}

.two {

background-image: url(https://unsplash.it/1920/1080?image=812);

}

.two .wrapper:before {

background: #faaa54;

mix-blend-mode: difference;

}

.three {

background-image: url(https://unsplash.it/1920/1080?image=810);

}

.three .wrapper:before {

background: #6c320a;

mix-blend-mode: screen;

}

.four {

background-image: url(https://unsplash.it/1920/1080?image=634);

}

.four .wrapper:before {

background: #e4135d;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值