How does this effect of the border come true?

the effect is as follows

Css
Apr.14,2022

reference:

  1. https://codepen.io/AZGSKULL/p...
  2. https://codepen.io/hari_shanx...

A handful of codepen.


this is more expensive to write in CSS, so you can design and give you a picture instead.


for example, you define four span, then use positioning, and then set their borders to display


css
 .rect {
      position: absolute;
      top: 20px;
      left: 20px;
      width: 100px;
      height: 100px;
      text-align: center;
      line-height: 100px;
      background: linear-gradient(to left, -sharpf00, -sharpf00) left top no-repeat,
        linear-gradient(to bottom, -sharpf00, -sharpf00) left top no-repeat,
        linear-gradient(to left, -sharpf00, -sharpf00) right top no-repeat,
        linear-gradient(to bottom, -sharpf00, -sharpf00) right top no-repeat,
        linear-gradient(to left, -sharpf00, -sharpf00) left bottom no-repeat,
        linear-gradient(to bottom, -sharpf00, -sharpf00) left bottom no-repeat,
        linear-gradient(to left, -sharpf00, -sharpf00) right bottom no-repeat,
        linear-gradient(to left, -sharpf00, -sharpf00) right bottom no-repeat;
      background-size: 1px 20px, 20px 1px, 1px 20px, 20px 1px;
    }
    
html
  <div class="rect"></div>
.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4936b-44d15.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4936b-44d15.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?