Home >Web Front-end >HTML Tutorial >Under what circumstances should display: block be added to a div? _html/css_WEB-ITnose
I made an adaptive width navigation background using -moz-linear-gradient background. Why can’t it be displayed without adding display: block?
div is block by default, unless the default value is changed due to inheriting other styles, then according to Sometimes it may be necessary to explicitly specify block
display:none to hide
display:block to display
Generally, when designing to display ads or login pages on the page, it needs to be controlled in JS Visible properties of DIV.
display:none Hide
display:block Show
Generally, when designing to display advertisements or login pages on the page, you need to control the visible attributes of the DIV in JS.
The div is block by default, unless the default value is changed due to inheriting other styles. In this case, you may need to explicitly specify block as needed