Re: [問題] 用CSS排版banner的問題
※ 引述《terlin10 (小Ya)》之銘言:
: 我網頁的banner想要排成三個圖,左邊和右邊是固定大小的圖
: 中間是可以隨瀏覽的寬度自行調整的圖
: 左右的圖我是設定
: position:relative;
: float:left(right);
: width:100px;
: height100px;
: background-image:url(URL);
: 概略的設定是這樣,可是中間那個我不知道該如何去設定
: 有人可以指導一下嗎?感謝您~
我的方法
html:
<div style="width:600px;">
<div id="lf"></div>
<div id="rt"></div>
<div id="ct"></div>
</div>
css:
#lf /*左邊*/
{
float:left;
width:100px;
height:100px;
background-image:url('aaa.jpg');
}
#rt /*右邊*/
{
float:right;
width:100px;
height:100px;
background-image:url('bbb.jpg');
}
#ct /*中間*/
{
float:none;
width:auto;
height:100px;
background-image:url('ccc.jpg');
}
PS:不要設定 position:relative;
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.120.159.50
推
11/25 16:39, , 1F
11/25 16:39, 1F
推
11/30 14:31, , 2F
11/30 14:31, 2F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):