简体   繁体   English

替换的内联元素和内联块元素之间的差异

[英]Differences between replaced inline elements and inline-block elements

Could I get a few concrete examples of how these two differ? 我可以举几个具体例子说明这两者之间的区别吗? It seems that replaced inline elements have properties like width , height , margin etc that non-replaced inline elements don't have (thus making the difference between block elements and replaced inline elements harder to explain) and vice versa, inline-blocks have some of the delicate features that inline elements have as well... 似乎已替换的内联元素具有未替换的内联元素所不具有的widthheightmargin等属性(因此使得块元素和已替换的内联元素之间的区别更难解释),反之亦然,内嵌块具有一些内联元素还具有的精致功能...

They sorta meet in the middle it seems coming from two different ends... 他们在中间相遇,似乎来自两个不同的目标。

Maybe this fiddle will give you a better insight in inline , inline-block and block 也许这个小提琴会让您对inlineinline-blockblock有更好的了解

http://jsfiddle.net/4h9JS/ http://jsfiddle.net/4h9JS/

The biggest difference is that inline-block is still an inline element, but behaves as a block element 最大的区别是inline-block仍然是一个inline元素,但表现为block元素

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM