如何添加带有HTML页面标题的图片? [英] How to add image with title of an HTML page?

查看:1478
本文介绍了如何添加带有HTML页面标题的图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在页面的标题中添加页面的图片或徽标,并在Chrome,Firefox或其他浏览器中显示该标题? class =h2_lin>解决方案

摘自什么是Favicon.ico和如何为您的网站创建Favicon图标


如何创建Favicon.ico文件



1.创建尺寸为16X16像素的图像。是的,它非常小,你不能真正吸取太多。你也应该将自己限制为
标准的Windows 16色彩,尽管我怀疑256色
可以正常工作。


如果您愿意,还可以创建一个32X32像素图标,该图标将按
缩放至收藏夹菜单和位置栏的大小。您可以
甚至将16X16和32X32像素图标放入同一个图标文件中。
当用户
打开一个设置为显示大图标的文件夹时,Windows将使用前者作为菜单,后者将使用前者。如果你不能打扰,这可能是
没有必要这么做。


2.将图像保存为ICO文件(当然命名为favicon.ico)。

3.将其上传至您的网站。如果你不想浪费空间,你不需要上传一个到你网站的每个目录 - 简单地把
它放在你的根目录下,支持favicon
的web浏览器会显然找到它最终。您也可以将它上传到您的
图片目录中,但是如果
的话您需要修改您的网页。有关详细信息,请参阅本文后面的内容。



帮助!我的Web主机不允许ICO文件!



如果您的托管公司不允许上载带有.ICO扩展名
的文件,您可以尝试通过将其上传(使用
二进制模式)和其他扩展(如GIF)来解决此问题。一旦它在
网站上,请使用您的FTP程序将其重命名为正确的扩展名。

$ C>< HEAD>
< link rel =快捷图标href =/ favicon.icotype =image / x-icon/>
< / head>


How to add image or logo of a page with the title of that page which is displayed with the title in chrome, firefox or other browsers?

解决方案

Taken from What is Favicon.ico and How to Create a Favicon Icon for Your Website

How to Create a "Favicon.ico" File

1.Create an image 16X16 pixels in size. Yes, it is really small and you can't really draw much in it. You should also restrict yourself to the standard Windows 16 colours, although I suspect that 256 colours will work fine.

If you like, you can also create a 32X32 pixel icon, which will be scaled to size for the Favorites menu and the location bar. You can even put both 16X16 and 32X32 pixel icons into the same icon file. Windows will use the former for its menus and the latter when the user opens up a folder that is set to display large icons. It's probably not really necessary to do this if you can't be bothered.

2.Save the image as an ICO file (named "favicon.ico", of course).

3.Upload it to your website. You don't need to upload one to every directory of your site if you don't want to waste space - simply put it in your root directory and the web browsers that support favicons will apparently locate it eventually. You can also upload it into your images directory, but you will need to modify your web pages if you do. See later in this article for more information on this.

Help! My Web Host Doesn't Allow ICO Files!

If your hosting company does not allow files with the .ICO extension to be uploaded, you might try to work around it by uploading it (in binary mode) with some other extension (like GIF). Once it's on your site, rename it using your FTP program to the correct extension.

<head>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> 
</head>

这篇关于如何添加带有HTML页面标题的图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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