【发布时间】:2014-05-29 10:19:49
【问题描述】:
我为 joomla 3.2 开发了一个组件,我是 adding 一个 CSS 文件。
my_component/views/my_view/tmpl/default.php:
$document = JFactory::getDocument();
$document->addStyleSheet("components/my_component/static/css/my_css.css");
它有效,它已加载但“为时过早”。
<link rel="stylesheet" href="my_project/components/com_ciceron/static/css/styles.css" type="text/css" />
<link rel="stylesheet" href="my_project/templates/business/font/mavenpro.css" type="text/css" />
<link rel="stylesheet" href="my_project/templates/business/css/styles.css" type="text/css" />
<link rel="stylesheet" href="my_project/templates/business/css/newStyles.css" type="text/css" />
<link rel="stylesheet" href="my_project/templates/business/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="my_project/templates/business/css/font-awesome.min.css" type="text/css" />
</head>
如您所见,我添加的文件是在模板 css 之前添加的,因此会覆盖一些 css 规则。
有什么方法可以在模板 CSS 之后添加一个 CSS 文件?还是就在头部关闭标签之前?
提前致谢。
【问题讨论】:
标签: css joomla stylesheet joomla3.0 joomla-component