zoukankan      html  css  js  c++  java
  • 【小实现】css after+border实现标签半菱形

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
      <style>
        .span-line-begin {
          background-color: blue;
          position: relative;
          margin-right: 8px;
        }
    
        .span-line-begin:after {
          content: "";
          position: absolute;
          display: inline-block;
           0;
          height: 0;
          border-top: 10px solid transparent;
          border-left: 10px solid blue;
          border-bottom: 10px solid transparent;
        }
    
        .span-line-end {
          background-color: blue;
          position: relative;
          margin-left: 8px;
        }
    
        .span-line-end::after {
          content: "";
          left: -10px;
          position: absolute;
          display: inline-block;
           0;
          height: 0;
          border-top: 10px solid transparent;
          border-right: 10px solid blue;
          border-bottom: 10px solid transparent;
        }
    
    
        #triangle_right {
           0;
          height: 0;
          border-top: 70px solid transparent;
          border-left: 140px solid #ff5a00;
          border-bottom: 70px solid transparent;
        }
      </style>
    
    </head>
    
    <body>
      <span>6152</span>
      <span class="span-line-begin">&lt;111&gt;</span>
      <span class="span-line-begin">&lt;222&gt;</span>
      <span>wew</span>
      <span class="span-line-end">&lt;/222&gt;</span>
      <span class="span-line-end">&lt;/111&gt;</span>weqwe
    
      <div id="triangle_right"></div>
    
    </body>
    
    </html>
    
  • 相关阅读:
    Spring aop 实现异常拦截
    drf 视图家族
    算法与数据结构
    接口
    Kubernetes
    drf
    drf 序列化
    drf 内部模块
    drf 接口
    vue
  • 原文地址:https://www.cnblogs.com/tangge/p/11946322.html
Copyright © 2011-2022 走看看