three实现三维世界最高楼天气切换场景代码

代码语言:html

所属分类:三维

代码描述:three实现三维世界最高楼天气切换场景代码

代码标签: three 三维 世界 最高 天气 切换 场景 代码

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

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Three.js 迪拜高楼三维世界 - 天气切换</title>
  <style>
    html, body {
      margin: 0;
      padding: 0;
      overflow: hidden;
      background: #000;
      font-family: Arial, Helvetica, sans-serif;
    }

    #ui {
      position: absolute;
      top: 15px;
      left: 15px;
      z-index: 20;
      background: rgba(0,0,0,0.45);
      color: #fff;
      padding: 12px;
      border-radius: 10px;
      backdrop-filter: blur(6px);
      box-shadow: 0 4px 18px rgba(0,0,0,0.25);
    }

    #ui h3 {
      margin: 0 0 10px 0;
      font-size: 16px;
    }

    #ui button {
      margin: 4px 4px 0 0;
      padding: 8px 12px;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      background: #1e88e5;
      color: #fff;
      font-size: 14px;
    }

    #ui button:hover {
      background: #1565c0;
    }

    #tips {
      margin-top: 10px;
      font-size: 12px;
      line-height: 1.5;
      color: #d9ecff;
    }

    #loading {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      background: linear-gradient(180deg, #0d1b2a, #000);
      z-index: 30;
      font-size: 20px;
      letter-spacing: 1px;
    }
  </style>
</head>
<body>
  <div id="loading">正在加载三维世界...</div>

  <div id="ui">
    <h3>天气切换</h3>
    <button onclick="setWeather('sunny')">晴天</button>
    <button onclick="setWeat.........完整代码请登录后点击上方下载按钮下载查看

网友评论0