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

San*_*kha 11 zend-framework blueprint-css

任何人都可以帮我搞清楚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;
?>
Run Code Online (Sandbox Code Playgroud)

而且这段代码也不起作用

<?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;
?>
Run Code Online (Sandbox Code Playgroud)

更新::

它看起来很像

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

Ric*_*nop 20

$this->view->headLink()->appendStylesheet('/css/ie.css', 'screen', 'IE');
$this->view->headLink()->appendStylesheet('/css/ie6.css', 'screen', 'IE6'); 
Run Code Online (Sandbox Code Playgroud)


Jak*_*e N 5

你是这个意思吗

->appendStylesheet($this->baseUrl('/css/ie6.css'), "screen", 'IE 6')
Run Code Online (Sandbox Code Playgroud)

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

希望有所帮助.