HTML块元素和CSS显示块属性之间的区别 [英] Difference between HTML block elements and CSS display block property
问题描述
我可以知道HTML块元素(例如 因为从我读过的内容可以看出,是相同的,但为什么我们仍然需要为某些块级元素使用 所谓的HTML块元素是将其显示属性设置为 此显示属性由用户代理样式表(即您的浏览器)设置。您可以在用户代理样式表下的chrome开发工具中查看这些属性。 使用 May I know if there is any difference between HTML block elements (Eg. Since from what I have read they are the same, but why we still need to use What you call "HTML block elements" are elements who have their display property set to This display property is set by the user agent stylesheet (i.e your browser). You can view these properties in chrome dev tool under "user agent stylesheet". The only reason I see of using 这篇关于HTML块元素和CSS显示块属性之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!< p>
,< div> $ c
display:block
。
block
的元素,因此< div>
和a < span>
,其中 display:block;
。
display:block;对于
div
元素,code>是
$ b
display:none;
<p>
, <div>
,...) and CSS property display: block
?display: block
for some block level element.block
so there is no difference between a <div>
and a <span>
with display:block;
. display:block;
for a div
element is :
display:none;