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;
  }
相关推荐
老兵发新帖1 分钟前
pnpm 与 npm 的核心区别
前端·npm·node.js
超级土豆粉3 分钟前
怎么打包发布到npm?——从零到一的详细指南
前端·npm·node.js
OpenTiny社区8 分钟前
TinyEngine 2.5版本正式发布:多选交互优化升级,页面预览支持热更新,性能持续跃升!
前端·低代码·开源·交互·opentiny
声声codeGrandMaster30 分钟前
Django框架的前端部分使用Ajax请求一
前端·后端·python·ajax·django
重生之后端学习2 小时前
02-前端Web开发(JS+Vue+Ajax)
java·开发语言·前端·javascript·vue.js
繁依Fanyi3 小时前
用 CodeBuddy 实现「IdeaSpark 每日灵感卡」:一场 UI 与灵感的极简之旅
开发语言·前端·游戏·ui·编辑器·codebuddy首席试玩官
来自星星的坤5 小时前
【Vue 3 + Vue Router 4】如何正确重置路由实例(resetRouter)——避免“VueRouter is not defined”错误
前端·javascript·vue.js
香蕉可乐荷包蛋9 小时前
浅入ES5、ES6(ES2015)、ES2023(ES14)版本对比,及使用建议---ES6就够用(个人觉得)
前端·javascript·es6
未来之窗软件服务9 小时前
资源管理器必要性———仙盟创梦IDE
前端·javascript·ide·仙盟创梦ide
liuyang___10 小时前
第一次经历项目上线
前端·typescript