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;
  }
相关推荐
莹雨潇潇11 分钟前
Docker 快速入门(Ubuntu版)
java·前端·docker·容器
Jiaberrr19 分钟前
Element UI教程:如何将Radio单选框的圆框改为方框
前端·javascript·vue.js·ui·elementui
Tiffany_Ho1 小时前
【TypeScript】知识点梳理(三)
前端·typescript
安冬的码畜日常2 小时前
【D3.js in Action 3 精译_029】3.5 给 D3 条形图加注图表标签(上)
开发语言·前端·javascript·信息可视化·数据可视化·d3.js
太阳花ˉ2 小时前
html+css+js实现step进度条效果
javascript·css·html
小白学习日记3 小时前
【复习】HTML常用标签<table>
前端·html
丁总学Java3 小时前
微信小程序-npm支持-如何使用npm包
前端·微信小程序·npm·node.js
yanlele3 小时前
前瞻 - 盘点 ES2025 已经定稿的语法规范
前端·javascript·代码规范
懒羊羊大王呀4 小时前
CSS——属性值计算
前端·css