如何使用 zend-framework 应用条件样式表 $this->headLink()->appendStylesheet('css/css.css')

发布于 2024-10-12 12:14:25 字数 1059 浏览 5 评论 0原文

任何人都可以帮我解决 IE 的 css (对于蓝图 css)

我已经完成的操作

<?php $headlink = $this->headLink();        
    $headlink->appendStylesheet($this->baseUrl('css/blueprint/screen.css') , 'screen, projection')
        ->appendStylesheet($this->baseUrl('css/blueprint/ie.css'), 'screen, projection', "IE")
        ->appendStylesheet($this->baseUrl('css/blueprint/print.css'));
    echo $headlink;
?>

,并且此代码不起作用

<?php $headlink = $this->headLink();        
    $headlink->appendStylesheet($this->baseUrl('css/blueprint/screen.css') , 'screen, projection')
        ->appendStylesheet($this->baseUrl('css/blueprint/ie.css'), 'screen, projection', true)
        ->appendStylesheet($this->baseUrl('css/blueprint/print.css'));
    echo $headlink;
?>

更新::

它应该看起来像

<!--[if lt IE 8]><link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->

can anyone help me with what to do for css for IE (for blueprint css)

I have done

<?php $headlink = $this->headLink();        
    $headlink->appendStylesheet($this->baseUrl('css/blueprint/screen.css') , 'screen, projection')
        ->appendStylesheet($this->baseUrl('css/blueprint/ie.css'), 'screen, projection', "IE")
        ->appendStylesheet($this->baseUrl('css/blueprint/print.css'));
    echo $headlink;
?>

and this code didn't work either

<?php $headlink = $this->headLink();        
    $headlink->appendStylesheet($this->baseUrl('css/blueprint/screen.css') , 'screen, projection')
        ->appendStylesheet($this->baseUrl('css/blueprint/ie.css'), 'screen, projection', true)
        ->appendStylesheet($this->baseUrl('css/blueprint/print.css'));
    echo $headlink;
?>

UPDATES::

it shoudl look like

<!--[if lt IE 8]><link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夏至、离别 2024-10-19 12:14:25
$this->view->headLink()->appendStylesheet('/css/ie.css', 'screen', 'IE');
$this->view->headLink()->appendStylesheet('/css/ie6.css', 'screen', 'IE6'); 
$this->view->headLink()->appendStylesheet('/css/ie.css', 'screen', 'IE');
$this->view->headLink()->appendStylesheet('/css/ie6.css', 'screen', 'IE6'); 
情定在深秋 2024-10-19 12:14:25

这就是您的意思吗

->appendStylesheet($this->baseUrl('/css/ie6.css'), "screen", 'IE 6')

IE 6 中的部分可以是用于包含 IE 特定样式表的任何表达式

希望有帮助。

Is this what you mean

->appendStylesheet($this->baseUrl('/css/ie6.css'), "screen", 'IE 6')

The section with IE 6 in, can be any expression used for including IE specific stylesheets

Hope that helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文