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

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

相关推荐
whale fall几秒前
npm install安装的node_modules是什么
前端·npm·node.js
烛阴6 分钟前
简单入门Python装饰器
前端·python
袁煦丞1 小时前
数据库设计神器DrawDB:cpolar内网穿透实验室第595个成功挑战
前端·程序员·远程工作
天天扭码1 小时前
从图片到语音:我是如何用两大模型API打造沉浸式英语学习工具的
前端·人工智能·github
Liudef061 小时前
2048小游戏实现
javascript·css·css3
鱼樱前端2 小时前
今天介绍下最新更新的Vite7
前端·vue.js
coder_pig3 小时前
跟🤡杰哥一起学Flutter (三十四、玩转Flutter手势✋)
前端·flutter·harmonyos
万少3 小时前
01-自然壁纸实战教程-免费开放啦
前端
独立开阀者_FwtCoder3 小时前
【Augment】 Augment技巧之 Rewrite Prompt(重写提示) 有神奇的魔法
前端·javascript·github
yuki_uix3 小时前
AI辅助网页设计:从图片到代码的实践探索
前端