StupidBeauty
Read times:512Posted at:Thu Jan 12 23:31:23 2012
- no title specified

转载:CSS display 屬性用法介紹 display:block 與 display:inline

display:block导致可以对该元素直接设置尺寸信息,对于文字对象,默认是inline的,它的尺寸由浏览器计算得出。

http://www.webtech.tw/info.php?tid=37

亮点:

許多人會搞不清楚 CSS 中的 display:block 與 display:inline 到底有什麼樣的差異

  • •. display:block - 區塊,元素會以區塊方式呈現,除非設定 position 或 float。

  • •. display:inline - 所有文字或圖片均不換行,也就是全部都會是同一行的意思。

block 的特性是可以設定高度(height)、寬度(width)、上方與下方距離,像是 div、p、ul、li 均屬 block。而 inline 高度與寬度都不能設定,文字或圖片所佔的寬度就是他的寬度,像是 span、a、input、img、em 均屬 inline。

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4