简体   繁体   English

如何在Joomla 1.5.20中的文章中添加自定义CSS?

[英]How to add custom CSS to an article in Joomla 1.5.20?

How to add custom CSS to an article in Joomla 1.5.20? 如何在Joomla 1.5.20中的文章中添加自定义CSS?

I have installed JUMI, but see no effect of it in article editor. 我已经安装了JUMI,但是在文章编辑器中看不到它的效果。

How to use it? 如何使用它?

I have a bunch of CSS styles to apply. 我有一堆CSS样式可以应用。

As much as I would love to rant on about how you should upgrade to Joomla 2.5 or 3.2, I won't but please at least upgrade to Joomla 1.5.26 which is the latest version of the 1.5 series. 我想就如何升级到Joomla 2.5或3.2尽我所能,但我不会,但至少请升级到1.5系列的最新版本Joomla 1.5.26。

To add custom CSS to your article, simply download and install a plugin called Sourcerer . 要将自定义CSS添加到文章中,只需下载并安装一个名为Sourcerer的插件。 This plugin allows you to add custom code to any article. 该插件可让您向任何文章添加自定义代码。 Once installed, open your article in the Article Manager and you can use the following for custom CSS: 安装后,在文章管理器中打开您的文章,您可以将以下内容用于自定义CSS:

{source}
<style>
    #element {
         //code goes here
    }   
</style>
{/source}

This extensions can also be used for Javascript/jQuery and PHP. 此扩展名也可以用于Javascript / jQuery和PHP。 I have used this extension on multiple website and it simply just does the job. 我已经在多个网站上使用了此扩展程序,它只是完成了工作。

Hope this helps 希望这可以帮助

Back when I used joomla 1.5, which has hit end of life and is recommended to upgrade to joomla 2,5 or higher. 回到我使用的joomla 1.5时,它已经寿终正寝,建议升级到joomla 2,5或更高版本。 I used Flexi Custom Code. 我使用了Flexi自定义代码。 I would also create a module position in the head of my template that would allow me to stick the custom code into. 我还将在模板的头部创建一个模块位置,以便将自定义代码粘贴到其中。

If Jumi Works like flexi did, then you just have to add aa pair of tags around your css and publish it to a specific position. 如果Jumi Works像flexi一样,那么您只需要在CSS周围添加一对标签并将其发布到特定位置即可。

[EDIT] When You add the CSS you add the Css code you create a new module, and publish the module to a position in the template that is being displayed. [编辑]添加CSS时,将添加CSS代码,然后创建一个新模块,并将该模块发布到正在显示的模板中的某个位置。 [/EDIT] [/编辑]

That is How I used to do it. 这就是我过去的做法。

Hope that helps 希望能有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM