Home  >  Article  >  Web Front-end  >  内联元素转化为块状元素?_html/css_WEB-ITnose

内联元素转化为块状元素?_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 08:53:221124browse

各位大大们好,我是自学的新人,最近看十八哥的教程学到内联与块状的转化 。
有个问题不是很明白:为什么内联元素为什么非要转化成块状呢?

百度查过,内联元素转化为块状元素最常见的是导航栏。

为什么我们不是直接设置为块状元素呢?而要先设置为内联元素,再转化为块状?
请各位大大指点一下。谢谢


回复讨论(解决方案)

你先看看 
1.
块元素元素有什么优点和缺点

2.
行元素有什么优点和缺点

元素性质互相转换(以上对内联元素设置需要转换a{display:block})
display:block;  内联转块级元素
display:inline;  块级转内联
display:inline-block;  使块级元素不独占一排
display:none;  不显示啦

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn