3 回答

TA貢獻(xiàn)10條經(jīng)驗(yàn) 獲得超10個(gè)贊
1、text-align是讓文本居中 <div>我是第一個(gè)div</div> -> 這里的div是塊級(jí)元素沒(méi)錯(cuò),但是div里的內(nèi)容(我是第一個(gè)div)是文本, 即是inline-block 直接 div{text-align:center;}
?2、舉個(gè)例子:<div><img src="">我是div里面的inline-block</<img><div> 以上純屬個(gè)人理解

TA貢獻(xiàn)1036條經(jīng)驗(yàn) 獲得超461個(gè)贊
行內(nèi)元素都在一行默認(rèn)從左到右顯示,當(dāng)然不會(huì)自動(dòng)居中了,想讓行內(nèi)元素居中,就需要給它的父級(jí)添加 text-align:center;

TA貢獻(xiàn)446條經(jīng)驗(yàn) 獲得超0個(gè)贊
http://idcbgp.cn/wenda/detail/348889
http://idcbgp.cn/wenda/detail/345150
http://idcbgp.cn/wenda/detail/351229
http://idcbgp.cn/wenda/detail/342279
http://idcbgp.cn/wenda/detail/386187
http://idcbgp.cn/wenda/detail/352075
http://idcbgp.cn/wenda/detail/356502
http://idcbgp.cn/wenda/detail/389281
http://idcbgp.cn/wenda/detail/356918
http://idcbgp.cn/wenda/detail/386197
http://idcbgp.cn/wenda/detail/394941
http://idcbgp.cn/wenda/detail/382074
http://idcbgp.cn/wenda/detail/389425
http://idcbgp.cn/wenda/detail/395487
http://idcbgp.cn/wenda/detail/356048
http://idcbgp.cn/wenda/detail/382784
http://idcbgp.cn/wenda/detail/385817
http://idcbgp.cn/wenda/detail/384128
http://idcbgp.cn/wenda/detail/385494
http://idcbgp.cn/wenda/detail/388316
http://idcbgp.cn/wenda/detail/383442
http://idcbgp.cn/wenda/detail/355450
http://idcbgp.cn/wenda/detail/342033
http://idcbgp.cn/wenda/detail/387423
http://idcbgp.cn/wenda/detail/362348
http://idcbgp.cn/wenda/detail/383630
http://idcbgp.cn/wenda/detail/387361
http://idcbgp.cn/wenda/detail/410608
http://idcbgp.cn/wenda/detail/377540
http://idcbgp.cn/wenda/detail/388328
http://idcbgp.cn/wenda/detail/385555
http://idcbgp.cn/wenda/detail/363399
http://idcbgp.cn/wenda/detail/356619
http://idcbgp.cn/wenda/detail/383239
http://idcbgp.cn/wenda/detail/377654
http://idcbgp.cn/wenda/detail/362346
http://idcbgp.cn/wenda/detail/417335
http://idcbgp.cn/wenda/detail/356831
http://idcbgp.cn/wenda/detail/387320
http://idcbgp.cn/wenda/detail/384104
http://idcbgp.cn/wenda/detail/383498
http://idcbgp.cn/wenda/detail/385846
http://idcbgp.cn/wenda/detail/546033
http://idcbgp.cn/wenda/detail/356647
http://idcbgp.cn/wenda/detail/381372
http://idcbgp.cn/wenda/detail/390126
http://idcbgp.cn/wenda/detail/381670
http://idcbgp.cn/wenda/detail/385845
http://idcbgp.cn/wenda/detail/390690
http://idcbgp.cn/wenda/detail/362141
http://idcbgp.cn/wenda/detail/342389
http://idcbgp.cn/wenda/detail/339680
http://idcbgp.cn/wenda/detail/383525
http://idcbgp.cn/wenda/detail/394965
http://idcbgp.cn/wenda/detail/390738
http://idcbgp.cn/wenda/detail/459186
http://idcbgp.cn/wenda/detail/382828
http://idcbgp.cn/wenda/detail/356542
http://idcbgp.cn/wenda/detail/377562
http://idcbgp.cn/wenda/detail/350025
http://idcbgp.cn/wenda/detail/352280
http://idcbgp.cn/wenda/detail/381464
http://idcbgp.cn/wenda/detail/363055
http://idcbgp.cn/wenda/detail/356454
http://idcbgp.cn/wenda/detail/339921
http://idcbgp.cn/wenda/detail/385831
http://idcbgp.cn/wenda/detail/408173
http://idcbgp.cn/wenda/detail/385582
http://idcbgp.cn/wenda/detail/332808
http://idcbgp.cn/wenda/detail/353369
http://idcbgp.cn/wenda/detail/390585
http://idcbgp.cn/wenda/detail/362177
http://idcbgp.cn/wenda/detail/344918
http://idcbgp.cn/wenda/detail/356011
http://idcbgp.cn/wenda/detail/350246
http://idcbgp.cn/wenda/detail/362796
http://idcbgp.cn/wenda/detail/363054
http://idcbgp.cn/wenda/detail/395478
http://idcbgp.cn/wenda/detail/352714
添加回答
舉報(bào)