js+css实现漂浮空中图片浮动点击放大相册效果代码

代码语言:html

所属分类:图片放大

代码描述:js+css实现漂浮空中图片浮动点击放大相册效果代码

代码标签: js css 漂浮 空中 图片 浮动 点击 放大 相册

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

<!DOCTYPE html>
<html lang="en" >

<head>
 
<meta charset="UTF-8">
 

 
<style>
/* Resetting some basic styles */
* {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
}

/* Fullscreen container */
body {
        background-color: #1a1919;
        font-family: "Roboto", sans-serif;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        margin: 0;
        overflow: hidden;
        position: relative;
}

/* pop-up */

.popup {
        position: fixed;
        bottom: -100px;
        right: 10px;
        width: 300px;
        height: 170px;
        background-color: #0170b9;
        border-radius: 8px;
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        transition: bottom 0.5s ease, opacity 0.5s ease;
        z-index: 9999;
}

.popup-content {
        padding: 1rem 0.6rem;
        padding-bottom: 1.5rem;
        text-align: center;
}

.popup-text {
        font-size: 13px;
        font-weight: 400;
        color: #fff;
        letter-spacing: 1px;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.popup.show {
        bottom: 10%;
        opacity: 1;
}

/* end pop-up */

/* Container for the 3D effect */
.container {
        display: flex;
        justify-content: center;
        align-items: center;
        perspective: 1200px;
}

/* 3D card setup */
.tilt-card {
        width: 300px;
        height: 400px;
        position: relative;
        transform-style: preserve-3d;
        transition: transform 0.4s ease-in-out, box-shadow 0.3s ease,
                background-color 0.3s ease;
        cursor: pointer;
        border-radius: 10px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.tilt-card:hover {
        transform: scale(1.1) rotat.........完整代码请登录后点击上方下载按钮下载查看

网友评论0