首页
学习
活动
专区
圈层
工具
发布

应用云开发copilot快速生成赛博木鱼

在某公众号看到一套快速生成赛博木鱼的prompt,这里应用云开发copilot测试一下看看生成的效果如何。

具体prompt如下

创建一个网页,标题为“赛博木鱼”,设计要求如下:

页面整体布局背景与样式:

背景颜色为深色 #121212,文字颜色为纯白 #FFFFFF。

使用楷体 'Kaiti SC' 和现代字体 'PingFang SC',无对应字体时备用 sans-serif。

页面内容居中对齐,顶部为标题区,中央为木鱼点击区域,底部为提示文字,整体垂直分布。

标题区:

包含三个部分:

主标题:显示渐变文字“赛博木鱼”,字体大小为 25vw,使用 'Kaiti SC',渐变从 rgba(255, 176, 103, 0.05)(浅橙色)到 rgba(115, 55, 0, 0.02)(浅棕色),方向为 180°,通过 -webkit-background-clip: text 和 -webkit-text-fill-color: transparent 实现渐变文字效果。

计分器:显示分数,初始值为 0,字体大小 10vh,字体为 PingFang SC,加粗 900,垂直居中。

描述文字:显示“功德”,字体大小 5vh,字体为 PingFang SC,居中对齐。

木鱼点击区:

包含一个木鱼和锤子图案:木鱼图片链接:https://img.alicdn.com/imgextra/i3/O1CN012CO0YU1VSfNs506ZS_!!6000000002652-2-tps-284-236.png。

锤子图片链接:https://img.alicdn.com/imgextra/i1/O1CN01tKb5Et1aSjWRjCHK3_!!6000000003329-2-tps-119-69.png。

锤子的相对位置:锤子固定在木鱼的右上角,具体位置为相对于木鱼的右侧边缘偏上,保持一定距离以呈现动态打击效果。锤子的初始旋转角度为 0°,静态时与木鱼形成俯视敲击的视觉关系。

点击木鱼触发以下交互:

播放点击音效,音频链接:https://qianwen.alicdn.com/resource/qiaomuyu.mp3。

锤子短暂旋转(-25°),随后复位至 0°,动画时间为 0.1s。

木鱼放大至 scale(1.1) 后复位,动画时间为 0.1s。

显示动态漂浮字幕“功德+1”,字体为 PingFang SC,大小 1.5em,位置从木鱼上方漂浮消失,动画时间 0.4s。

点击后分数加 1,实时更新计分器内容。

底部提示:

显示文字“轻敲木鱼,细悟赛博真经。”,字体为 'Kaiti SC',大小为 1.2em,水平居中,与木鱼区域保持一定间距。

动态效果锤子旋转:通过 transform: rotate() 和 transition: 0.1s 实现点击旋转动画,锤子始终保持在木鱼右上角的相对位置。

木鱼放大:通过 transform: scale() 和 transition: 0.1s 实现短暂放大动画。

漂浮字幕:通过 opacity 和 transform 实现透明度和垂直移动的动画,过渡时间为 0.4s。确保网页整体布局美观,锤子的右上角位置和点击动画流畅,字体易读,动画效果完美融合禅意与现代赛博风格。

代码生成界面

最终生成结果如下

代码语言:txt
复制
```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>赛博木鱼</title>
    <style>
        body {
            background-color: #121212;
            color: #FFFFFF;
            font-family: 'Kaiti SC', 'PingFang SC', sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            height: 100vh;
            margin: 0;
        }

        .title {
            text-align: center;
        }

        .main-title {
            font-size: 25vw;
            background-image: linear-gradient(180deg, rgba(255, 176, 103, 0.05), rgba(115, 55, 0, 0.02));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .score {
            font-size: 10vh;
            font-weight: 900;
        }

        .description {
            font-size: 5vh;
        }

        .wooden-fish-container {
            position: relative;
            margin-top: 50px;
        }

        .wooden-fish {
            width: 284px;
            height: 236px;
        }

        .hammer {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 119px;
            height: 69px;
            transition: transform 0.1s;
        }

        .hammer:hover,
        .hammer:active {
            transform: rotate(-25deg);
        }

        .article-list {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .article-item {
            display: flex;
            justify-content: space-between;
            width: 80%;
            margin-top: 40px;
            opacity: 0;
            animation: fadeIn 0.5s forwards;
            animation-delay: calc(var(--i) * 0.2s);
        }

        .article-item img {
            width: 100px;
            height: 100px;
        }

        .article-info {
            margin-left: 20px;
        }

        .article-title {
            font-size: 1.5em;
        }

        .article-author,
        .article-date {
            font-size: 1em;
        }

        .footer {
            font-size: 1.2em;
            margin-top: 50px;
        }

        @keyframes fadeIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
    </style>
</head>
<body>
    <div class="title">
        <h1 class="main-title">赛博木鱼</h1>
        <div class="score">0</div>
        <p class="description">功德</p>
    </div>
    <div class="wooden-fish-container">
        <img src="https://img.alicdn.com/imgextra/i3/O1CN012CO0YU1VSfNs506ZS_!!6000000002652-2-tps-284-236.png" alt="木鱼" class="wooden-fish">
        <img src="https://img.alicdn.com/imgextra/i1/O1CN01tKb5Et1aSjWRjCHK3_!!6000000003329-2-tps-119-69.png" alt="锤子" class="hammer">
    </div>
    <p class="footer">轻敲木鱼,细悟赛博真经。</p>

    <script>
        const woodenFish = document.querySelector('.wooden-fish');
        const hammer = document.querySelector('.hammer');
        const scoreDisplay = document.querySelector('.score');
        let score = 0;

        woodenFish.addEventListener('click', () => {
            const audio = new Audio('https://qianwen.alicdn.com/resource/qiaomuyu.mp3');
            audio.play();

            hammer.style.transform = 'rotate(-25deg)';
            woodenFish.style.transform = 'scale(1.1)';

            setTimeout(() => {
                hammer.style.transform = 'rotate(0deg)';
                woodenFish.style.transform = 'scale(


以上回答由云开发 Copilot完成

使用指引: https://docs.cloudbase.net/ai/copilot/introduce
下一篇
举报
领券