首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Zend框架控制器文件(Apple Icons)

Zend框架控制器文件(Apple Icons)
EN

Stack Overflow用户
提问于 2012-07-26 01:02:32
回答 1查看 653关注 0票数 1

关于在zend框架的控制器文件中包含一些头信息的问题。我想包括苹果图标。从这里开始:http://gigaom.com/apple/how-to-create-ios-device-home-screen-icons-for-web-sites/

然而,当我查看它所在页面的实际源代码时,‘size’块没有显示出来。我假设rel和href已经是zend框架的原生版本了。我怎样才能让“尺寸”显示出来?

代码语言:javascript
复制
$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'));

这是在查看页眉中页面的源代码时实际显示的内容。

代码语言:javascript
复制
<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" />

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-07-26 01:41:10

您的sizesheadLink()不支持的任何其他开箱即用属性应该放在一个extras数组中,如下所示:

代码语言:javascript
复制
$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')));

(为清晰起见,换行。)

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11654924

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档