Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
267 views
in Technique[技术] by (71.8m points)

html - Take the middle of the top border away

I try to get the middle of the top stripe of the border away but not the whole top, how can I do this? I am doing Html. I tried a lot but without success I hope anyone can help me.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If I have understood you question correctly, something basic like this would hide the middle of the top border:

.box {
  position: relative;
  height: 100px;
  width: 300px;
  border: 10px solid #000;
}

.box .mask {
  border-top: 10px solid #fff;
  width: 100px;  
  position: absolute;
  top: -10px;
  left: 100px;  
}
<div class="box">
  <div class="mask"></div>
</div>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...