关于在zend框架的控制器文件中包含一些头信息的问题。我想包括苹果图标。从这里开始:http://gigaom.com/apple/how-to-create-ios-device-home-screen-icons-for-web-sites/
然而,当我查看它所在页面的实际源代码时,‘size’块没有显示出来。我假设rel和href已经是zend框架的原生版本了。我怎样才能让“尺寸”显示出来?
$this->view->headLink(array('rel' => 'apple-touch-icon', 'href' => '/images/icons/apple-touch-icon.png'));
$this->view->headLink(array('rel' => 'apple-touch-icon', 'sizes' => '72x72', 'href' => '/images/icons/apple-touch-icon-72x72.png'));
$this->view->headLink(array('rel' => 'apple-touch-icon', 'sizes' => '114x114', 'href' => '/images/icons/apple-touch-icon-114x114.png'));这是在查看页眉中页面的源代码时实际显示的内容。
<link href="/images/icons/apple-touch-icon.png" rel="apple-touch-icon" />
<link href="/images/icons/apple-touch-icon-72x72.png" rel="apple-touch-icon" />
<link href="/images/icons/apple-touch-icon-114x114.png" rel="apple-touch-icon" />谢谢
发布于 2012-07-26 01:41:10
您的sizes和headLink()不支持的任何其他开箱即用属性应该放在一个extras数组中,如下所示:
$this->view->headLink(array('rel' => 'apple-touch-icon',
'href' => '/images/icons/apple-touch-icon.png'));
$this->view->headLink(array('rel' => 'apple-touch-icon',
'href' => '/images/icons/apple-touch-icon-72x72.png',
'extras' => array('sizes' => '72x72')));
$this->view->headLink(array('rel' => 'apple-touch-icon',
'href' => '/images/icons/apple-touch-icon-114x114.png',
'extras' => array('sizes' => '114x114')));(为清晰起见,换行。)
https://stackoverflow.com/questions/11654924
复制相似问题