当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - set body display style none with one children display style block

问题描述:

It is possible to make the body display:none and have one children element display:block ?

I'm not sure how to make my question correctly formulated. I just want to hide the body content and then display a div element only.

网友答案:

By general rule, if a parent element has "display:none" property, no child can be rendered on a page, so the answer is "no".

You may consider to put that children element outside its parent, while being outside body element may affect the validation of your html code.

分享给朋友:
您可能感兴趣的文章:
随机阅读: