11

谁能帮我为 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]-->
4

2 回答 2

20
$this->view->headLink()->appendStylesheet('/css/ie.css', 'screen', 'IE');
$this->view->headLink()->appendStylesheet('/css/ie6.css', 'screen', 'IE6'); 
于 2011-01-17T13:56:26.693 回答
5

你是这个意思吗

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

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

希望有帮助。

于 2011-01-17T12:31:36.083 回答