css 实现 Popover 弹出框样式

DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Documenttitle>
    <style>
        body {
            margin: 20px;
        }
      .box {
        box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
        width: 200px;
        height: 100px;
        position: relative;
        border: 1px solid #ebeef5;
      }
      .arrow {
        border-width: 6px;
        position: absolute;
        width: 0;
        height: 0;
        border-color: transparent;
        border-style: solid;
        margin-left: -6px;
        top: -6px;
        left: 50%;
        border-top-width: 0;
        border-bottom-color: #ebeef5;
      }
      .arrow::after {
        content: " ";
        border-width: 6px;
        position: absolute;
        display: block;
        width: 0;
        height: 0;
        border-color: transparent;
        border-style: solid;
        top: 1px;
        margin-left: -6px;
        border-top-width: 0;
        border-bottom-color: #fff;
      }
    style>
  head>
  <body>
    <div class="box">
      <div class="arrow">div>
    div>
  body>
html>

你可能感兴趣的:(css,前端,javascript)