How to implement a layout like css layout

problem description

how do you implement such a layout when you encounter such a layout in your development?

clipboard.png

the environmental background of the problems and what methods you have tried

try to use postion to find some redundancy in css code. Is there any good way to ask for advice?

May.03,2021

Please Baidu css step bar keywords


try it with flex layout. Every day is a good module


A small demo,flex layout, each piece is independent, the number of up and down and the number of days if it is possible to wrap, you should add a non-wrapping constraint.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style type="text/css">
  *{padding:0;margin:auto;}
  ul{display:flex;align-items:center;justify-content:space-between;list-style:none;}
  li{width:33.33%;text-align:center;}
  .bar{width:100%;height:1px;margin:10px auto;background-color:-sharpccc;position:relative;}
  .bar .icon{height:14px;width:14px;display:inline-block;border-radius:50%;background-color:-sharpccc;position:absolute;left:50%;top:0;margin-top:-7px;margin-left:-7px;}
  </style>
</head>
<body>
  <div>
    <ul>
      <li>
        <div class="num">+1</div>
        <div class="bar">
          <span class="icon"></span>
        </div>
        <div class="day">1</div>
      </li>
      <li>
        <div class="num">+1</div>
        <div class="bar">
          <span class="icon"></span>
        </div>
        <div class="day">1</div>
      </li>
      <li>
        <div class="num">+1</div>
        <div class="bar">
          <span class="icon"></span>
        </div>
        <div class="day">1</div>
      </li>
    </ul>
  </div>
</body>
</html>
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-1b3aa45-2b778.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-1b3aa45-2b778.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?