Html 如何在页脚中隐藏文本

Html 如何在页脚中隐藏文本,html,css,Html,Css,我将以下内容作为.CSS文件的一部分:- #footer-profile { position: absolute; bottom: 0px; left: 50px; text-align: center; padding: 5px 10px; color: blue; background: yellow; opacity: .3; -moz-opacity: .3; filter: alpha(opaci

我将以下内容作为.CSS文件的一部分:-

    #footer-profile {
    position: absolute;
    bottom: 0px;
    left: 50px;
    text-align: center;
    padding: 5px 10px;
    color: blue;
    background: yellow;
    opacity: .3;
    -moz-opacity: .3;
    filter: alpha(opacity=30);
    -moz-border-radius: 20px 20px 0px 0px;
    -webkit-border-radius: 20px 20px 0px 0px;
}
#footer {
    position: relative;
    top: 20px;
    clear: both;
    text-align: center;
    padding: 20px;
    color: #999999;
}
但是如何在页脚内隐藏文本

显示:无

整个页脚将被隐藏。如果只想隐藏页脚的某些部分,请将它们添加到某个标记中,并隐藏类,然后添加规则:

#footer.hidden {
   display: none;
}
根据需要,您可以尝试使用可见性:隐藏;而不是显示:无;。第一个将隐藏元素,但会在布局中释放其空间,第二个将“折叠”元素,并可能更改布局

为完整起见,我想在您的帖子中添加Rohit Azar提供的解决方案作为评论:

#footer {
   font-size: 0;
}

此解决方案完全符合问题的要求。

如果只想隐藏文本,请尝试以下操作:

#footer{
text-indent:-99999px;
}

你能发布你的标记吗?同意一些标记会很好看到。但是,您能否将文本包装在标记中,并将其设置为display:hidden?@test-footer{font-size:0;}现在您的页脚文本是remove@testtest如果它解决了你的问题,请考虑接受答案。