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;
  }
相关推荐
布列瑟农的星空2 小时前
Playwright使用体验
前端·单元测试
卤代烃3 小时前
🦾 可为与不可为:CDP 视角下的 Browser 控制边界
前端·人工智能·浏览器
_XU3 小时前
AI工具如何重塑我的开发日常
前端·人工智能·深度学习
C_心欲无痕3 小时前
vue3 - defineExpose暴露给父组件属性和方法
前端·javascript·vue.js·vue3
鹿人戛3 小时前
HarmonyOS应用开发:相机预览花屏问题解决案例
android·前端·harmonyos
萌萌哒草头将军3 小时前
绿联云 NAS 安装 AudioDock 详细教程
前端·docker·容器
GIS之路4 小时前
GIS 数据转换:使用 GDAL 将 GeoJSON 转换为 Shp 数据
前端
朴shu5 小时前
Luckysheet 远程搜索下拉 控件开发 : 揭秘二开全流程
前端
MediaTea6 小时前
Python:模块 __dict__ 详解
开发语言·前端·数据库·python
字节跳动开源6 小时前
Midscene v1.0 发布 - 视觉驱动,UI 自动化体验跃迁
前端·人工智能·客户端