html5卡片式,HTML5 可翻滚卡片式模态框

CSS

语言:

CSSSCSS

确定

body {

background-color: #1d2020;

}

p {

color: #ecf0f1;

text-align: center;

}

a {

color: #95a5a6;

text-decoration: none;

}

.hidden {

opacity: 0;

}

.container {

width: 300px;

height: 300px;

margin: auto;

position: absolute;

top: 0;

left: 0;

bottom: 0;

right: 0;

-webkit-perspective: 800px;

perspective: 800px;

}

#card {

width: 100%;

height: 100%;

position: absolute;

-webkit-transform-style: preserve-3d;

transform-style: preserve-3d;

-webkit-transition: -webkit-transform 1s;

transition: transform 1s;

}

#card.flipped-anticlockwise {

-webkit-transform: rotateY(180deg);

transform: rotateY(180deg);

}

#card.flipped-clockwise {

-webkit-transform: rotateY(-180deg);

transform: rotateY(-180deg);

}

#card.flipped {

-webkit-transform: rotateX(-180deg);

transform: rotateX(-180deg);

}

#card.flipped-back {

-webkit-transform: rotateX(180deg);

transform: rotateX(180deg);

}

#card figure {

background-color: #27ae60;

color: #fff;

display: block;

position: absolute;

width: 100%;

height: 100%;

box-shadow: 5px 5px 15px 0 #222;

-webkit-backface-visibility: hidden;

backface-visibility: hidden;

}

#card figure.back {

display: none;

background-color: #2980b9;

}

#card figure.back.rotateY {

display: inline;

-webkit-transform: rotateY(180deg);

transform: rotateY(180deg);

}

#card figure.back.rotateX {

display: inline;

-webkit-transform: rotateX(-180deg);

transform: rotateX(-180deg);

}

.arrow-container {

font-size: 1.5em;

font-weight: bold;

width: 30px;

height: 30px;

margin: 0 auto;

text-align: center;

}

.arrow-container.top {

margin: 0 auto 135px auto;

height: 0;

}

.arrow-container.bottom {

width: 300px;

clear: both;

margin: 105px auto 0 auto;

}

.arrow-container.left-right {

width: 300px;

}

.arrow-container.left-right .left {

float: left;

}

.arrow-container.left-right .right {

float: right;

}

.arrow-container .arrow {

cursor: pointer;

}

.arrow-container .arrow:hover {

color: #c0392b;

}

.arrow-container .text {

font-weight: normal;

font-size: 0.8em;

}

.back .left-right {

margin-top: 135px;

}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值