[英]Hide Html inside of a <td> not the <td> itself
这必须是一个疯狂的基本问题,但是对于我的生活,我现在无法解决……
我有一个<td class="hide">Some text</td>
我只想隐藏<td>
内部的TEXT / HTML,而不是整个<td>
本身。 CSS如何实现?
*注意
在其中应用跨度等不一定是一种选择。
代替
display: none;
你可以试试
text-indent: -9999px;
使其透明怎么办?
opacity: 0.0;
您可以执行以下任一操作:
$('.hide').css('color','rgba(0,0,0,0)');//will make the text transparent and retain the width
要么
$('.hide').text('');//will delete the text, not retaining the width
要么:
$('.hide').wrap('<span style="opacity:0">');//will use a span and retain the width
希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.