如何在TYPO3中包含自定义CSS文件 [英] How to include a custom CSS file in TYPO3

查看:91
本文介绍了如何在TYPO3中包含自定义CSS文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在typo3 7.6中构建一个Extension。我在setup.txt文件中使用

I need to build an Extension in typo3 7.6.I include a css file in setup.txt using

page.IncludeCSS = Ext.Path_to_css_file.css

但是我的css文件中的样式被其他一些自定义样式覆盖。我该如何预防?任何想法?我是typo3的新手,请帮助我。谢谢您。

But the styles in my css file is override by some other custom styles.How can I prevent this.Any Idea? I am new to typo3.Please help me.Thank you in advance.

推荐答案

您必须给每个想要的CSS文件包括唯一键(例如 myCssFile1 )。在 EXT:之后也要使用冒号。因此,使用TypoScript包含CSS文件的正确方法是

You have to give each css file you want to include a unique key (e.g. myCssFile1). Also use a colon after the EXT:. So the correct way of including a CSS file with TypoScript would be

page.includeCSS.myCssFile1 = EXT:my_ext/Path/to/css_file.css

这篇关于如何在TYPO3中包含自定义CSS文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆