如何在chrome上设置/链接favicon中的favicon?

时间:2017-11-09 16:03:34

标签: html5 laravel laravel-5 php-7 laravel-blade

我想把我的链接图标放在收益中,但它不起作用,

如果我穿上它可以顺利工作。我不想把它放在每一页。

这是我的代码

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>@yield('title')</title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />
<!--     Fonts and icons     -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" />

<link rel="shortcut icon" sizes="72x72" href="{{{ asset('assets/img/ficon.png') }}}">

<!-- CSS Files -->
<link href="./assets/css/bootstrap.min.css" rel="stylesheet" />
<link href="./assets/css/now-ui-kit.css?v=1.1.0" rel="stylesheet" />
<!-- CSS Just for demo purpose, don't include it in your project -->
<link href="./assets/css/demo.css" rel="stylesheet" />

更新::我在firefox中打开它可以工作,但无法在chrome上显示,我也更新了我的chrome但仍然没有工作......

1 个答案:

答案 0 :(得分:1)

尝试添加大小,你的png可能太大。

 //resize the image using a photo editing software to either 144x144,114x114 or  72x72 
 //then specify the size like below

 <link rel="shortcut icon" sizes="114x114" href="{{{ asset('assets/img/ficon.png') }}}">

或试试这个:

<link rel="shortcut icon" sizes="114x114" href="assets/img/ficon.png">

您还可以尝试使用此here解决方案来修复Chrome问题