如何使用 styles.css 调用静态块
How to call static block with styles.css
我是网页设计的新手,我在 header.pthml
中使用
向我的 Magento 网站的 header 添加了一个静态块
<?php
echo $this->getLayout()->createBlock('cms/block')->setBlockId('header_links')->toHtml()
?>
现在我正尝试通过 css 定位方块,但这个方块不在常规 styles.css
.
中
我怎样才能将这个块放入 styles.css
文件中以添加位置?
您可以添加 css 使用以下代码:
$this->getLayout()->getBlock('head')->addCss('css/mymodule/stylesheet.css');
我是网页设计的新手,我在 header.pthml
中使用
<?php
echo $this->getLayout()->createBlock('cms/block')->setBlockId('header_links')->toHtml()
?>
现在我正尝试通过 css 定位方块,但这个方块不在常规 styles.css
.
我怎样才能将这个块放入 styles.css
文件中以添加位置?
您可以添加 css 使用以下代码:
$this->getLayout()->getBlock('head')->addCss('css/mymodule/stylesheet.css');