作者rushcat (嗯)
看板Web_Design
标题[问题] CSS定位问题
时间Tue Nov 21 09:44:39 2006
div图层如果没有特别定位 他应该会自动换行
<div>test1</div>
<div>test2</div>
test1
test2
但是刚刚想用css做表格时
<style>
.td{
float:left;
}
</style>
<div>
<div class="td">test1</div>
<div class="td">test2</div>
</div>
<div>
<div class="td">test3</div>
<div class="td">test4</div>
</div>
就会变成
test1 test2 test3 test4
是因为被td的float影响吗!?
感激回答
--
◢ █◣ ◢◢◣ ◢◣◥████
◢███◣ ◢ ◣ █╴█╴█ ████
███▉█ ◢█◢ ◣◢ ██ ≡███≡ ◥█
███▉█ ◢▉█ ◢██ ███ ◢██ ◢██ ███ ◥█﹋█◤ ◎ █
█▇▇▇◤ █▉█ █▇▇ █▇▏ ▉▇▇ █▉█ ██ ▉▉█▏▏/ ◢█
██▇▏◣ █▇█ ▇▇█ ██▏ ███ █▇█▎██ █▉▉█▏▏█ rushcat
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.119.199.250
1F:推 shiuu:你都定义td了,怎会没有差别呢?推个文断了5次线XD 11/21 10:54
2F:→ HiroshiKen:顺便问个题外话,为什麽要用div做table呢..? 11/21 12:13
3F:推 rushcat:因为目前碰到的情况 有些效果table做不到 又不想混搭 11/21 12:25
4F:→ rushcat:所以乾脆用div来写table 11/21 12:25