我可以为标题标签添加颜色和不同的字体吗? [英] Can I give a title tag a color and different font?

查看:173
本文介绍了我可以为标题标签添加颜色和不同的字体吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有办法在页面标签中为页面标题添加不同的颜色和字体。类似于:

I was wondering if there is a way to give a page title a different color and font in the page tab. Something like:

title{ color: red; font: 12px tahoma;} 

只是觉得添加到网站会很有趣。我尝试了上面的内容,它在我的CSS文件中不起作用。还尝试给它一个 class =title给它一个CSS样式 .title {color:red;字体:12px tahoma;} 但这也不起作用。

Just thought it would be fun to add into sites. I tried the above and it didn't work in my CSS file. Also tried giving it a class="title"giving it a CSS style of .title{ color: red; font: 12px tahoma;} but that didn't work either.

推荐答案

答案是你不能以任何方式做到这一点....你不能将任何样式应用于页面标题,顺便说一下你可以只是闪烁标题

Answer is NO you cannot do that in any way....you cannot apply any styles to page title, btw you can just blink the titles

闪烁标题

关于你正在使用的CSS的更多信息:

More Info On CSS Which You Are Using:

如果你宣布这样的话

title{ color: red; font: 12px tahoma;} 

您不需要定义任何类,因为您要定位特定标题标签在整个文档中只有1

You don't need to define any class as you are targeting specific title tag which is only 1 in your whole document

如果您使用的是 .title ,那么CSS应该

And if you are using .title than your CSS should be

.title{ color: red; font: 12px tahoma;} 

这篇关于我可以为标题标签添加颜色和不同的字体吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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