**创建一个右下角翻书效果的广告,你可以使用jQuery和CSS来实现。下面是一个简单的示例:
HTML:**

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="styles.css">
    <title>翻书效果广告</title>
</head>
<body>
    <div class="ad-container">
        <div class="ad-content">
            <div class="ad-cover"></div>
            <div class="ad-inner">
                <h1>特惠优惠</h1>
                <p>仅限今天</p>
                <a href="#">点击了解更多</a>
            </div>
        </div>
    </div>
    <script src="jquery-3.6.0.min.js"></script>
    <script src="script.js"></script>
</body>
</html>

CSS (styles.css):

body {
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
    font-family: Arial, sans-serif;
}

.ad-container {
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 200px;
    height: 200px;
    transform: rotate(0deg);
    transition: all 0.3s;
    cursor: pointer;
}

.ad-content {
    width: 100%;
    height: 100%;
    background: #3498db;
    border-radius: 5px;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.ad-cover {
    width: 100%;
    height: 100%;
    background: #2980b9;
    border-radius: 5px;
    position: absolute;
    top: 0;
    left: 0;
}

.ad-inner {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: white;
    border-radius: 5px;
    text-align: center;
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    transform: perspective(600px) rotateY(0deg);
    transform-style: preserve-3d;
    transition: all 0.3s;
}

.ad-container:hover {
    transform: rotate(20deg);
}

.ad-container:hover .ad-inner {
    transform: perspective(600px) rotateY(-20deg);
}

h1 {
    font-size: 24px;
}

p {
    font-size: 16px;
    color: #777;
}

a {
    display: inline-block;
    background: #2980b9;
    color: white;
    padding: 10px 20px;
    margin-top: 10px;
    text-decoration: none;
    border-radius: 5px;
}

a:hover {
    background: #3498db;
}

jQuery (script.js):

$(document).ready(function() {
    $('.ad-container').click(function() {
        window.location.href = 'https://example.com'; // 修改为你的目标链接
    });
});

上述代码会创建一个右下角翻书效果的广告,当鼠标悬停在广告上时,它会旋转,点击广告将导航到指定的链接。你需要将上述代码中的链接和样式替换为你自己的内容和样式。确保将jQuery库文件 (jquery-3.6.0.min.js) 放在与HTML文件相同的目录中,或者根据你的目录结构来更新相应的路径。

版权属于:泽泽社长
本文链接:https://blog.zezeshe.com/archives/bottom-right-corner.html
本站未注明转载的文章均为原创,并采用 CC BY-NC-SA 4.0 授权协议,转载请注明来源,谢谢!