Home > Web Front-end > JS Tutorial > body text

Web page favorites display ICO icon (less code)_Basic knowledge

WBOY
Release: 2016-05-16 15:47:28
Original
1316 people have browsed it

After adding a webpage to your favorites, you will see a beautiful icon. I am curious how it is achieved? In fact, the implementation of the code is very simple. Just add a sentence to the web page code. However, sometimes there is compatibility with IE6/IE7/other browsers. The code in the code box below is the code of IE6/IE7. After testing, it was found that Select IE7 code to achieve compatibility.

Note: Store the ICO icon in the root directory or other secondary column directories in advance. Also pay attention to the path when calling. Only relative paths are allowed.

<title>让你的网页收藏夹显示ICO图标</title>
<!--FOR IE7-->
<link rel="shortcut icon" href="/favicon.ico" />
<!--FOR IE6-->
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
Copy after login

Note that it will take some time to take effect.

The above code is relatively small, and you can display the ICO icon in your web favorites. I hope you like it.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!