如何使用CSS隐藏标题标记? [英] How can you hide the title tag using CSS?

查看:109
本文介绍了如何使用CSS隐藏标题标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < article id =node-13class =node node-article node-promoted node-teaser contextual-links-region clearfixabout =/ fos / node / 13typeof =sioc:Item foaf:Document> 

< header>

< h2 class =titleproperty =dc:titledatatype =>

< a href =/ fos / node / 13> TITLE GOES HERE .....< / a>

< / h2>

< / header>

< / article>

我需要使用CSS隐藏标题。



我如何做到这一点...



因为我是全新的CSS请教如何做这个..



更新:



针对唯一文章ID



如果我们给标题:隐藏它不会显示所有节点。



在我的例子中,它不应该只显示特定节点。

解决方案

提供 display:none; ::

  article#node-13 h2.title {display:none; } 

可选择使用 visibility:hidden; / p>

  article#node-13 h2.title {visibility:hidden;} 
pre>

display:none 表示相关标记不会显示在网页上 - rhere将不会为其分配空间之间的其他标签。



visibility:hidden 表示与 display:none 不同,标记不可见,它在页面上。


<article id="node-13" class="node node-article node-promoted node-teaser contextual-links-region clearfix" about="/fos/node/13" typeof="sioc:Item foaf:Document">

<header>

<h2 class="title" property="dc:title" datatype="">

 <a href="/fos/node/13">TITLE GOES HERE.....</a>

</h2>

</header>

</article>

I need to hide the title using CSS.

How can I do that...

As I am totally new to CSS kindly advice how to do this..

UPDATE:

For the unique article id

if we give title:hidden it will not display for all nodes.

In my case it should not display only for specific nodes.

解决方案

Give it display:none;:

article#node-13 h2.title { display: none; }

Alternativly use visibility:hidden;

article#node-13 h2.title { visibility:hidden;}

display:none means that the the tag in question will not appear on the page at all - rhere will be no space allocated for it between the other tags.

visibility:hidden means that unlike display:none, the tag is not visible, but space is allocated for it on the page.

这篇关于如何使用CSS隐藏标题标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆