js+css实现相册扑克牌式点击收起来更换效果代码

代码语言:html

所属分类:幻灯片

代码描述:js+css实现相册扑克牌式点击收起来更换效果代码

代码标签: js css 相册 扑克牌 点击 收起 更换

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <style>
          div {
    user-select: none
}

* {
    font-size: 2vmin;
    margin: 0;
    padding: 0
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    background-image: linear-gradient(to left bottom,#d87a00,#f46246,#fa557c,#e75eaf,#bc74d7,#9487eb,#6197f4,#00a3f3,#00afed,#00b9e0,#00c0cf,#2ac6bc)
}

.container {
    position: absolute;
    width: 45rem;
    height: 25rem;
    margin-bottom: 1rem
}

.poker,.poker_top {
    position: absolute;
    width: 20rem;
    height: 26rem;
    border-radius: 1.5rem;
    transform-origin: bottom left;
    overflow: hidden
}

.poker img,.poker_top img {
    position: relative;
    width: 100%
}

.poker_top {
    background-color: #fff;
    transition: .3s ease;
    cursor: pointer;
    z-index: 1000
}

.poker1 {
    transform: rotate(-10deg)
}

.poker2 {
    transform: rotate(-6deg) translate(15%,-12%)
}

.poker3 {
    transform: rotate(-2deg) translate(30%,-19%)
}

.poker4 {
    transform: rotate(2deg) translate(45%,-26%)
}

.poker5 {
    transform: rotate(6deg) translate(145%,-23%)
}

      </style>
    </head>
    <body>
        <div class="container">
            <div class="poker poker1">
                <img src="//repo.bfw.wiki/bfwrepo/image/629fe9ae4c888.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_300,h_400,/quality,q_90"/>
            </div>
            <div class="poker poker2">
                <img src="//repo.bfw.wiki/bfwrepo/image/6257e9f53b418.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_300,h_400,/quality,q_90"/>
            </div>
            <div class="poker poker3">
                <img src="//repo.bfw.wiki/bfwrepo/image/61e27364c2151.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_300,h_400,/quality,q_90"/>
            </div>
            <div class="poker poker4">
                <img src="//repo.bfw.wiki/bfwrepo/image/5fbedf8f5349c.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_300,h_400,/quality,q_90"/>
            </div>
            <div class="poker poker5">
                <img src="//repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/re.........完整代码请登录后点击上方下载按钮下载查看

网友评论0