我如何在我的div后面划一条线?

时间:2015-04-01 16:01:57

标签: jquery html css line

我想把我的虚线移到我的div之后。 它一直保持在我的div之上。

这是我现在所拥有的:

enter image description here

这是我希望得到的:

enter image description here

**CSS** 

/*Background Border*/
.border-center {
  width: 100%;
  position: relative;
}

.slide:before {
  content: '';
  position: absolute;
  border-bottom: 3px #3498db dashed;
  z-index: 1;
  top: 50%;
  margin-top:-2px;
  right: 10%;
  left: 40%;
  width: 25%; 

}

我希望我可以添加更多代码,因为我的代表很低,我收到了这个警告:

enter image description here

更多详情:JSFiddle

2 个答案:

答案 0 :(得分:1)

让你的小提琴z-index of 0成就了这一点,而background:white上的.tl-box

http://jsfiddle.net/1q6ur85k/2/

答案 1 :(得分:0)

简而言之,盒子的z-index需要高于线条,盒子需要背景颜色为白色,以防止线条显示。

这里大致完成了:http://jsbin.com/tupiqiqida/1/edit?html,css,output

相关问题