小编man*_*ish的帖子

两个div之间的垂直线限制高度

我正在尝试两个divs 之间的垂直线.但我不希望它与divs 具有相同的高度.我需要说从顶部切割10%,从底部切割10%.

.container {
  display: table;
  border: 1px solid blue;
}
.line {
  padding-right: 20px;
  border-right: 1px solid #cfc7c0;
}
.first {
  display: table-cell;
  width: 30%;
}
.second {
  display: table-cell;
  width: 30%;
  padding-left: 10px;
}
Run Code Online (Sandbox Code Playgroud)
<div class="container">
  <div class="first line">this is first div and some text</div>
  <div class="second">
    Right
    <br/>and more
    <br/>Side
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

http://jsfiddle.net/VKqEU/124/

请建议如何实现这一目标?

html css

4
推荐指数
1
解决办法
6832
查看次数

标签 统计

css ×1

html ×1