" "link rel="styleshee-6ren">
gpt4 book ai didi

php - 如何在 zend framework 2 语法中写在 CSS 行下面?

转载 作者:行者123 更新时间:2023-11-28 18:25:48 26 4
gpt4 key购买 nike

我想在 zend 2 风格中复制以下语法

"link rel="stylesheet" media="all" href="css/main.css" />"
"link rel="stylesheet" media="screen" href="css/enhanced.css" />"

请帮助任何人。

最佳答案

您正在寻找 headlink view helper

这是骨架应用程序的一些演示代码:

<head>
<meta charset="utf-8">
<?php echo $this->headTitle('ZF2 '. $this->translate('Skeleton Application'))->setSeparator(' - ')->setAutoEscape(false) ?>

<?php echo $this->headMeta()->appendName('viewport', 'width=device-width, initial-scale=1.0') ?>

<!-- Le styles -->
<?php echo $this->headLink(array('rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/images/favicon.ico'))
->prependStylesheet($this->basePath() . '/css/bootstrap-responsive.min.css')
->prependStylesheet($this->basePath() . '/css/style.css')
->prependStylesheet($this->basePath() . '/css/bootstrap.min.css') ?>

<!-- Scripts -->
<?php echo $this->headScript()->prependFile($this->basePath() . '/js/html5.js', 'text/javascript', array('conditional' => 'lt IE 9',))
->prependFile($this->basePath() . '/js/bootstrap.min.js')
->prependFile($this->basePath() . '/js/jquery.min.js') ?>

</head>

关于php - 如何在 zend framework 2 语法中写在 CSS 行下面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15807211/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com