1

如果我在从上到下的列表中有一系列文本,例如演员、标题、关于...

about 可以很大也可以很小。如果演员表低于大约,无论演员表中有多少文字,我如何始终保持演员表低于大约?

JSFIDDLE

#detail_center{position: absolute; height: 615px;left: 369px;top: 155px;width: 751px;}

#detail_center .title{position: absolute; top: 84px; left: 266px; font-size: 26px; color: black;}
#detail_center .runtime{position: absolute; top: 130px; left: 266px; font-size: 16px; color: black;}
#detail_center .icon-detail-bar{}
#detail_center .rating{position: absolute; top: 130px; left: 340px; font-size: 16px; color: black;}
#detail_center .synopsis{position: absolute; top: 160px; left: 266px; font-size: 16px; color: black;}
#detail_center .cast{position: absolute; top: 220px; left: 266px; font-size: 16px; color: black;}
#detail_center .lang{position: absolute; top: 290px; left: 266px; font-size: 16px; color: black;}

HTML

  <div id="detail_center">
   <div class="title">Some awesome movie title</div>
   <div class="runtime">116 mins  |</div>
   <div class="rating">PG-13</div>
   <div class="synopsis"> about stuff and stuff stuff and stufff and stuff stuff and stutuff and stuff stuff and stuff stuff and stuff stuff and stuff stuff and stuff</div>
   <div class="cast">CAST:</div>
   <div class="lang">LANGUAGES:</div>
  </div>
4

1 回答 1

2

position:absolute从子元素的 CSS 中取出。看到这个工作 jsFiddle

于 2013-09-18T23:06:11.300 回答