我希望一个快速的问题。
我正在使用 Joomla!2.5.8。我刚刚发现了 eCSSential,它在 index.php 中使用了以下代码
<script>
<!-- Add eCSSential.min.js inline here -->
eCSSential({
"all": "css/all.css",
"(min-width: 20em)": "css/min-20em.css",
"(min-width: 37.5em)": "css/min-37.5em.css",
"(min-width: 50em)": "css/min-50em.css",
"(min-width: 62.5em)": "css/min-62.5em.css"
});
</script>
现在,在我的 Joomla 中!文件我有这个...
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/js/eCSSential.js"></script>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/nameoftemplate/css/style.css" type="text/css" />
<link rel="stylesheet" media="screen and (max-width: 1024px)" href="<?php echo $this->baseurl ?>/templates/nameoftemplate/css/max-width-1024.css" type="text/css" />
<link rel="stylesheet" media="screen and (max-width: 768px)" href="<?php echo $this->baseurl ?>/templates/nameoftemplate/css/max-width-758.css" type="text/css" />
<link rel="stylesheet" media="screen and (max-width: 524px)" href="<?php echo $this->baseurl ?>/templates/nameoftemplate/css/max-width-524.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/css/lightbox.css" type="text/css" />
我不太明白我应该如何在脚本的大括号中编写文件路径,以便它在 Joomla! 中工作。我猜使用的示例只是一个普通的目录结构?我尝试了一些组合,但没有任何效果,因为该网站仍然没有样式......
希望有人能帮忙!