【vue】css模拟玻璃球体效果(带高光)

div部分:

bash 复制代码
<div class="wave_ball">
        <!--          高光部分-->
        <div class="lightBg light1"></div>
        <div class="lightBg light2"></div>
      </div>

样式部分:

bash 复制代码
.wave_ball {
    position: absolute;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    overflow: hidden;
    line-height: 0;
    border-radius: 50%;
    //background: #267dd3;
    box-shadow: inset 0 0 15px 2px rgb(255, 255, 255, 0.6),
    inset 0 0 20px 20px rgb(255, 255, 255, 0.25);
    z-index: 3;

    .lightBg {
      position: absolute;
      background: radial-gradient(farthest-side at 50% 50%, #ffffffb0 5%, #0000);
    }

    .light1 {
      top: 80px;
      left: 130px;
      border-radius: 30px;
      width: 50px;
      height: 70px;
      transform: rotateY(20deg) rotate(55deg)
    }

    .light2 {
      top: 180px;
      left: 60px;
      border-radius: 30px;
      width: 26px;
      height: 80px;
      transform: rotateY(20deg) rotate(23deg)
    }
    }

效果图(仅玻璃球部分):

相关推荐
2601_958492553 小时前
Optimizing Engagement with Freehead Skate - HTML5 Game - Construct 3
前端·html·html5
茉莉玫瑰花茶4 小时前
工作流的常见模式 [ 1 ]
java·服务器·前端
zhangxingchao4 小时前
AI应用开发六:企业知识库
前端·人工智能·后端
山峰哥5 小时前
SQL慢查询调优实战:从全表扫描到索引覆盖的完整复盘
前端·数据库·sql·性能优化
红尘散仙5 小时前
一个 `#[uniffi::export]`,把 Rust 接进 React Native
前端·后端·rust
moshuying5 小时前
AI Coding 最大的 token 黑洞,可能根本不是 prompt
前端
红尘散仙5 小时前
一行 `#[specta::specta]`,让 Tauri IPC 有类型
前端·后端·rust
lichenyang4535 小时前
HarmonyOS HMRouter 接入记录:从普通 Tab Demo 到路由跳转
前端
木斯佳6 小时前
前端八股文面经大全:腾讯WXG暑期前端一面(2026-05-15)·面经深度解析
前端·面试·笔试