【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)
    }
    }

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

相关推荐
宿67412 小时前
vue3-包管理器
前端·vue.js
@PHARAOH12 小时前
WHAT - Remix 入门和基本实践:理解两套产物
前端·remix
mayaairi13 小时前
Vue2 生命周期完全指南:从创建到销毁的8个钩子函数
前端·javascript·vue.js
xy345313 小时前
axure9.0 如何打造一个计时器(简单版)
前端·ui·html·axure·原型·产品设计
IMPYLH14 小时前
HTML 的 <pre> 元素
前端·javascript·html
tsumikistep15 小时前
【前端】Vue + Axios 跨域问题实战:7070 代理转发 8080 + 401 报错分析(黑马外卖)
前端·javascript·vue.js
lichenyang45315 小时前
鸿蒙首页从等高商品 Grid 到双列瀑布流:同一张图也能做出小红书式浏览节奏
前端
里欧跑得慢15 小时前
Flutter主题与样式详解
前端·css·flutter·web
toooooop815 小时前
智慧文旅数字人体验平台demo html
css·css3
计算机魔术师15 小时前
TPU推理性价比翻50%,NVIDIA的护城河要见底了?
前端