看板 Web_Design 關於我們 聯絡資訊
※ 引述《yshlptt (小y)》之銘言: : 一、使用絕對位置定位 : 把 container 元素設為 position: relative(或依需求設定 absolute) : ... 這個真炫,我也是第一次看到。以前也有種常見的做法是把 parent 設成 relative,child 設 absolute,加上 top 與 margin-top 調位置。 http://jsbin.com/notifucigedo/7/edit?html,css,output 缺點是要知道 child 的高度。 這個方法好像是之前在板上看到的,用空的行區塊原素設 height: 100% 來填滿高度。 http://jsbin.com/peqilugomemi/1/edit?html,css,output 缺點就是要處理空白符,網路上也滿多討論 http://css-tricks.com/fighting-the-space-between-inline-block-elements/ 個人覺得目前最好的做法還是 display: table-cell,和 Bootstrap 的 Grid system 也能很好的配合。 -- (* ̄▽ ̄)/‧★*"`'*-.,_,.-*'`"*-.,_☆,.-*` http://i.imgur.com/oAd97.png -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.43.121.28 ※ 文章網址: http://www.ptt.cc/bbs/Web_Design/M.1408710368.A.C8C.html