Can I give a title tag a color and different font?(我可以给标题标签一个颜色和不同的字体吗?)
问题描述
我想知道是否有办法在页面选项卡中为页面标题赋予不同的颜色和字体.比如:
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;font: 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.
推荐答案
答案是 NO
你不能以任何方式这样做......你不能将任何样式应用于页面标题,顺便说一句你可以只是闪烁标题
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:
如果您要声明这样的内容
If you are declaring something like this
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;}
这篇关于我可以给标题标签一个颜色和不同的字体吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我可以给标题标签一个颜色和不同的字体吗?


基础教程推荐
- 每次设置弹出窗口的焦点 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01