css.ppt,纯Css幻灯片

css

/****************************************/

html, body {

margin: 0;

background-color: #101010;

font-family: sans-serif;

}

.slideshow {

width: 100%;

height: 100%;

border: 0px;

padding: 0px;

margin: 0 auto;

background-color: #000;

overflow: hidden;

}

input {

display: none;

}

input:checked + .slide {

transform: translateX(0px);

transition: transform 0.5s ease-in-out;

}

input:checked + .slide .slide__content {

width: 100%;

display: block;

}

.slide {

transform: translateX(-100%);

position: absolute;

width: 50%;

height: 100%;

background-size: 50% 100%;

transition: transform 0.5s ease-in-out;

}

.slide__content {

box-sizing: border-box;

height: calc(100% - 60px);

overflow: scroll;

padding: 50px;

color: #DDD;

position: absolute;

left: 100%;

display: none;

animation-name: fade-in;

animation-duration: 1s;

animation-iteration-count: 1;

opacity: 1;

}

.slide:nth-child(3) {

background: url("https://placehold.it/2000x2500/2E112D/fff?text=1");

background-repeat: no-repeat;

background-size: 100%;

background-position: center;

}

.slide:nth-child(3):after {

position: absolute;

margin: auto;

top: 0px;

right: 0px;

bottom: 0px;

left: 0px;

width: 100%;

height: 100px;

}

.slide:nth-child(6) {

background: url("https://placehold.it/2000x2500/540032/fff?text=2");

background-repeat: no-repeat;

background-size: 100%;

background-position: center;

}

.slide:nth-child(6):after {

position: absolute;

margin: auto;

top: 0px;

right: 0px;

bottom: 0px;

left: 0px;

width: 100%;

height: 100px;

}

.slide:nth-child(9) {

background: url("https://placehold.it/2000x2500/820333/fff?text=3");

background-repeat: no-repeat;

background-size: 100%;

background-position: center;

}

.slide:nth-child(9):after {

position: absolute;

margin: auto;

top: 0px;

right: 0px;

bottom: 0px;

left: 0px;

width: 100%;

height: 100px;

}

.slide:nth-child(12) {

background: url("https://placehold.it/2000x2500/C9283E/fff?text=4");

background-repeat: no-repeat;

background-size: 100%;

background-position: center;

}

.slide:nth-child(12):after {

position: absolute;

margin: auto;

top: 0px;

right: 0px;

bottom: 0px;

left: 0px;

width: 100%;

height: 100px;

}

.slide:nth-child(15) {

background: url("https://placehold.it/2000x2500/F0433A/fff?text=5");

background-repeat: no-repeat;

background-size: 100%;

background-position: center;

}

.slide:nth-child(15):after {

position: absolute;

margin: auto;

top: 0px;

right: 0px;

bottom: 0px;

left: 0px;

width: 100%;

height: 100px;

}

label {

box-sizing: border-box;

color: #AAA;

font-weight: bold;

display: block;

width: calc((50% / 5) - 2%);

margin: 5px 1%;

height: 50px;

line-height: 50px;

border-bottom: solid 4px #AAA;

text-align: center;

position: absolute;

bottom: 5px;

text-transform: uppercase;

}

label:hover {

cursor: pointer;

color: #FFF;

border-bottom: solid 4px #FFF;

}

label:nth-child(1) {

left: calc(50% + (0 * (50% / 5)));

border-bottom-color: #2E112D;

}

label:nth-child(4) {

left: calc(50% + (1 * (50% / 5)));

border-bottom-color: #540032;

}

label:nth-child(7) {

left: calc(50% + (2 * (50% / 5)));

border-bottom-color: #820333;

}

label:nth-child(10) {

left: calc(50% + (3 * (50% / 5)));

border-bottom-color: #C9283E;

}

label:nth-child(13) {

left: calc(50% + (4 * (50% / 5)));

border-bottom-color: #F0433A;

}

@keyframes fade-in {

0% {

opacity: 0;

}

50% {

transform: translateY(-50px);

opacity: 0;

}

100% {

transform: translateY(0px);

opacity: 1;

}

}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值