首页 > 其他分享 >在div之前画一条连接线

在div之前画一条连接线

时间:2023-12-22 09:24:06浏览次数:23  
标签:连接线 一条 boxItem type after right div border before

<html>

<head>
  <style>
    div.boxItem {
      display: inline-block;
      border: 1px solid black;
      padding: 1em;
      margin-right: 5em;
      position: relative
    }

    .boxItem:before,
    .boxItem:after {
      content: '';
      width: 5em;
      /* size of your margin */
      border-bottom: 1px solid;
      position: absolute;
      top: 50%;

    }

    :after {
      left: 100%;
    }

    :before {
      right: 100%;
    }

    .boxItem:first-of-type:before,
    .boxItem:last-of-type:after {
      display: none;
    }

    .myBox {
      white-space: nowrap;
      /* */
      text-align: center;
    }

    body {}
  </style>
</head>

<body>
  <div class="myBox">
    <div class="boxItem">1</div>
    <div class="boxItem">2</div>
    <div class="boxItem">3</div>
    <div class="boxItem">4</div>
  </div>
  <div class="myBox">
    <div class="boxItem">1</div>
    <div class="boxItem">2</div>
    <div class="boxItem">3</div>
  </div>
  <div class="myBox">
    <div class="boxItem">1</div>
    <div class="boxItem">2</div>
  </div>
  <div class="myBox">
    <div class="boxItem">1</div>
  </div>
</body>

</html>

 

 

<html>
<head>   <style>     div.boxItem {       display: inline-block;       border: 1pxsolidblack;       padding: 1em;       margin-right: 5em;       position: relative     }
    .boxItem:before,     .boxItem:after {       content: '';       width: 5em;       /* size of your margin */       border-bottom: 1pxsolid;       position: absolute;       top: 50%;
    }
    :after {       left: 100%;     }
    :before {       right: 100%;     }
    .boxItem:first-of-type:before,     .boxItem:last-of-type:after {       display: none;     }
    .myBox {       white-space: nowrap;       /* */       text-align: center;     }
    body {}   </style> </head>
<body>   <div class="myBox">     <div class="boxItem">1</div>     <div class="boxItem">2</div>     <div class="boxItem">3</div>     <div class="boxItem">4</div>   </div>   <div class="myBox">     <div class="boxItem">1</div>     <div class="boxItem">2</div>     <div class="boxItem">3</div>   </div>   <div class="myBox">     <div class="boxItem">1</div>     <div class="boxItem">2</div>   </div>   <div class="myBox">     <div class="boxItem">1</div>   </div> </body>
</html>

标签:连接线,一条,boxItem,type,after,right,div,border,before
From: https://www.cnblogs.com/duixue/p/17920544.html

相关文章

  • 数据库编程大赛:一条SQL计算扑克牌24点
    你是否在寻找一个平台,能让你展示你的SQL技能,与同行们一较高下?你是否渴望在实战中提升你的SQL水平,开阔你的技术视野?如果你对这些都感兴趣,那么本次由NineData主办的《数据库编程大赛》,将是你的最佳选择!大赛奖品本次数据库编程大赛的奖项安排:一等奖(1人)、二等奖(2人)、三等奖(3人)、......
  • [LeetCode] 1362. Closest Divisors 最接近的因数
    Givenaninteger num,findtheclosesttwointegersinabsolutedifferencewhoseproductequals num+1 or num+2.Returnthetwointegersinanyorder.Example1:Input:num=8Output:[3,3]Explanation:Fornum+1=9,theclosestdivisorsare3&......
  • Codeforces Round 916 (Div. 3)
    目录写在前面ABCDE1/E2FG1G2写在最后写在前面比赛地址:https://codeforces.com/contest/1914。第二天没早八打个div3休闲娱乐保持下手感,然而div3都AK不了了,纯纯废物一个,天天上大学导致的。唉,一学期碰上好几个byd恼弹老师,大学一秒也不想上了,折磨。马娘台服马上1.5周......
  • Educational Codeforces Round 160 (Rated for Div. 2)
    A.RatingIncrease字符串处理#include<bits/stdc++.h>usingnamespacestd;voidsolve(){ strings; cin>>s; intn=s.size(); s=""+s; for(inti=1;i<=n-1;i++){ stringt=""; for(intj=1;j<=i;j++){ t=t+s[j]; } ......
  • Codeforces Round 916 (Div. 3)
    A.ProblemsolvingLogmap枚举字母#include<bits/stdc++.h>usingnamespacestd;voidsolve(){ intn; strings; cin>>n>>s; intans=0; s=""+s; map<char,int>mp; for(inti=1;i<=n;i++){ mp[s[i]]++; } for(autoc:mp)......
  • 列表页删除最后一页的最后一条数据,定位前一页数据
    1、调用后端接口时,返回最大页码数,这样就可以避免//最后一页就剩一条,删除或者取消关注,默认展示前一页if(tableData?.length==0&&currentPage>1){ constbeforePageNum=result?.maxPage==0?1:result?.maxPage; setCurrentPage(beforePageNum);}2、计......
  • Codeforce Round 916(div3)
    CodeforcesRound916(div3)[Problem-A-Codeforces]:ProblemsolvingLogA.题直接看样例进行分析,发现每一次出现的字符代表着用了1分钟来看这道题,每道题都有固定的解题时间,只要达到了这个解题时间,就可以将这题解出来,答案就要加上1;同时要注意将解决过的问题要标记一下;#in......
  • Codeforces Round 916 (Div. 3)(A~E2)
    A统计一下每个字母的出现次数然后输出即可#include<bits/stdc++.h>#definerep(i,a,b)for(registerinti=(a);i<=(b);++i)#definefep(i,a,b)for(registerinti=(a);i>=(b);--i)#definelsp<<1#definersp<<1|1#definePIIpair<int,int&......
  • Educational Codeforces Round 160 (Rated for Div. 2) A~C
    A.RatingIncrease题意:将一个字符串分成两个整数a和b,要求没有前导0,且a<b思路:遍历字符串s,若当前位置不是0,则拆分字符串,比较大小//#include<bits/stdc++.h>#include<iostream>#include<string>#include<cstring>#include<vector>#include<algorithm>#inclu......
  • Educational Codeforces Round 160 (Rated for Div. 2)
    基本情况A题秒了。B题卡了实在太久,BC题最后虽然都过了,但是耗时太久。感觉C对我来说更好写。B.SwapandDelete经典+3。总是一条路偏要走到黑了才会想着换思路,早该换了。一开始想了一大堆乱七八糟的思路,但都错了。后面往简单了想,这题毕竟最后必须要左对齐的,直接从左往右比......