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;
  }
相关推荐
cdbqss13 分钟前
VB.net编写的身份证类
前端·.net
骑自行车的码农21 分钟前
React短文系列 遍历fiber树 App的创建
前端·react.js
AskSky25 分钟前
为了搞一个完美的健身APP,我真是费尽心机
前端
斯~内克30 分钟前
基于Vue.js和PDF-Lib的条形码生成与批量打印方案
前端·vue.js·pdf
阴阳怪气乌托邦31 分钟前
别再啃OA代码了!低代码"搭积木"式搞数智化,我直接少写500行
前端·低代码
beelan35 分钟前
v-on的思考
前端
山河木马38 分钟前
前端学习C++之:.h(.hpp)与.cpp文件
前端·javascript·c++
用户92724725021938 分钟前
PHP + CSS + JS + JSON 数据采集与展示系统,支持伪静态
前端
努力只为躺平42 分钟前
一文搞懂 Promise 并发控制:批量执行 vs 最大并发数,实用场景全解析!
前端·javascript
李大玄1 小时前
Google浏览器拓展工具 "GU"->google Utils
前端·javascript·github