[問題] div輸入文字後會位移
<style type="text/css">
div {
background-color:rgb(255,255,255);
margin:5px 5px 5px 5px;
display:inline-block;
width:100px;
height:100px;
overflow:auto;
}
.test {
color:#FF0000;
}
</style>
<div><p class="test">123456</p></div>
<div><span class="test">123456</span></div>
<div></div>
<div></div>
<div></div>
--
程式碼擷取如上。
弄成HTML網頁後,有輸入文字的部分位移了。
雖然在div的css中加上 「overflow:auto;」就OK,
但還是不知道是什麼原因會造成這樣的位移?
麻煩各位先進給予指教!!
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.118.17.64
※ 文章網址: http://www.ptt.cc/bbs/Web_Design/M.1399015344.A.FD4.html
→
05/02 18:39, , 1F
05/02 18:39, 1F
推
05/02 18:50, , 2F
05/02 18:50, 2F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 2 篇):
問題
1
2