我如何将图像放在页面标题旁边 [英] how can i put image beside page title

查看:92
本文介绍了我如何将图像放在页面标题旁边的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在页面标题旁边放置图像

就像在Facebook上,页面标题旁边有图像Facebook

how can i put image beside page title

like on facebook there is image beside page title Facebook

推荐答案

它是一个Favicon,请尝试以下代码.

Its a Favicon, try below code.

     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
      xmlns="http://www.w3.org/1999/xhtml" 
      xml:lang="en-US"
      lang="en-US">
<head profile="http://www.w3.org/2005/10/profile">
<link rel="icon">
      type="image/png" 
      href="/somewhere/myicon.png" />
[…]
</link></head>
[…]
</html>


听起来就像您在谈论在页面标题中添加图标一样.

它称为favicon.网站图标是大多数浏览器中地址栏左边缘或选项卡上显示的小图像.

在您的网站上添加网站图标非常简单:
-首先,您需要创建一个16 x 16像素的图标,并将其命名为favicon.ico.
-其次,将生成的文件("favicon.ico")上传到您的网站根文件夹.
-第三,通过在浏览器的位置键入 http://mysite.com/favicon.ico 来验证它是否存在,其中"mysite.com"是您网站的地址.
-接下来,将以下代码插入到页面的HEAD部分中,至少将您网站的主索引页面插入其中:
Sounds like you are talking of adding an icon in the page header.

It''s called favicon. A favicon is the little image displayed at the left edge of the address bar in most browsers, or on the tab.

Adding a favicon to your website is very easy:
- First, you need to create a 16 by 16 pixel icon and name it favicon.ico.
- Second, Upload the generated file ("favicon.ico") to your site root folder.
- Third, Verify it''s there by typing http://mysite.com/favicon.ico in the browser''s location, where "mysite.com" is your site''s address.
- Next, insert the below code in the HEAD section of your pages, at the very least, your site''s main index page:
<link rel="shortcut icon" href="favicon.ico" />



如有需要,请参阅以下内容以供参考:
http://www.w3.org/2005/10/howto-favicon [ ^ ]
http://www.c-sharpcorner.com /uploadfile/afenster/add-a-favicon-to-your-Asp-Net-page/ [ http://www.chami.com/tips/internet/110599i.html [ ^ ]
http://www.javascriptkit.com/howto/customicon.shtml [



If needed, have a look at these to refer:
http://www.w3.org/2005/10/howto-favicon[^]
http://www.c-sharpcorner.com/uploadfile/afenster/add-a-favicon-to-your-Asp-Net-page/[^]
http://www.chami.com/tips/internet/110599i.html[^]
http://www.javascriptkit.com/howto/customicon.shtml[^]


这篇关于我如何将图像放在页面标题旁边的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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