CSS弹窗

CSS 曲线弹窗和气泡弹窗小笔记,高德地图

html 复制代码
let content = [
      '<div class="overview-bus-info-window">',
      '<div class="line1"></div><div class="line2"></div>',
      `<div class="title">${data.plateNum}</div>`,
      `<div class="name"><span class="label">驾驶员</span>${data.driverName}</div>`,
      `<div class="name"><span class="label">状态</span>${data.isUsedValue}(${data.onLineValue})</div>`,
      "</div>",
      "</div>"
    ];
css 复制代码
  // 信息弹出框
  .overview-bus-info-window {
    background-image: linear-gradient(
      -179deg,
      rgba(64, 89, 134, 0.9) 0%,
      rgba(7, 20, 43, 0.9) 100%
    );
    border: 2px solid #91a6cf;
    border-radius: 3px;
    width: 218px;
    height: 132px;
    padding: 16px 20px;
    position: relative;
    .line1 {
      position: absolute;
      top: 50%;
      background: #9fbbed;
      left: -60px;
      height: 2px;
      width: 60px;
    }
    .line2 {
      position: absolute;
      top: 50%;
      left: -70px;
      background: #9fbbed;
      width: 2px;
      height: 57px;
      transform: skewX(-20deg);
    }
    .title {
      color: #ddeaff;
      font-size: 18px;
      margin-bottom: 15px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
    .name {
      margin-bottom: 5px;
      font-size: 16px;
      color: #ddeaff;
    }
    .label {
      color: rgba(221, 234, 255, 0.5);
      display: inline-block;
      min-width: 52px;
      margin-right: 15px;
    }
  }

标注气泡,背景是图片

html 复制代码
 let content = [
      `<div class="overview-site-marker-text ${config.textClass}">`,
      `<div>${setOut.num}</div>`,
      `<div class="number">${setOut.successNum}</div>`,
      "</div>"
    ];
css 复制代码
 // 站点气泡样式
  .overview-site-marker-text {
    width: 62px;
    height: 74px;
    font-size: 24px;
    padding-top: 7px;
    text-align: center;
    .number {
      font-size: 16px;
      color: #ffffff;
      margin-top: -6px;
    }
  }
    .overview-site-marker-text.site-red-text {
    background: url("../img/map/overview/siteRedText.png") no-repeat;
    color: #d94b4e;
  }
  .overview-site-marker-text.site-green-text {
    background: url("../img/map/overview/siteGreenText.png") no-repeat;
    color: #52c41a;
  }
  .overview-site-marker-text.site-yellow-text {
    background: url("../img/map/overview/siteYellowText.png") no-repeat;
    color: #f6db2e;
  }
相关推荐
Amos_Web1 分钟前
Rspack 源码解析(三):从入口到依赖图,读懂 Make 阶段的 Rust 任务循环
前端·rust
晴天163 分钟前
浏览器中ESM与AMD模块共存的解决方案
前端·node.js
芳心粽伙饭19 分钟前
CSS第一章 CSS引入
前端·css
雪芽蓝域zzs1 小时前
第三十二节:部门组织管理(el‑tree 组织树
前端·javascript·vue.js
leoZ2311 小时前
第 7 篇:进阶——校验、联动、列表页
开发语言·前端·javascript·vue.js·人工智能·目标检测·ecmascript
VeryCool1 小时前
别吹了,依赖图像识别的GPT‑6 Astra永远快不起来
前端·javascript·aigc
hunterandroid1 小时前
Android 测试全景:从单元测试到 UI 自动化的完整实践
android·前端
leoZ2311 小时前
第 8 篇:与 AI 协作的工作流 + 完整案例
前端·人工智能·神经网络·自然语言处理·性能优化·c#·php
背对疾风1 小时前
提前还贷,缩短年限和降低月供其实是一样的
前端
2501_928996221 小时前
Agent 开发 API 选型:硅碳相变下 Function Calling 兼容性与多模型路由拆解
前端