我们可以将CSS文件集成到CHM文件中吗? [英] Can we integrate CSS file into a CHM file ?

查看:283
本文介绍了我们可以将CSS文件集成到CHM文件中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将html文件和CSS文件添加到一个Chm文件中。
是否可能?

解决方案

您是否拥有生成的CHM文件的所有项目和源文件?

如果是 - 您可以。否则你必须反编译并重新创建项目文件。
你知道,建议使用CSS创建干净的HTML文件。

一些额外的信息,你可以将CSS文件添加到[文件]如下所述。


帮助编译器尝试将.chm中直接*引用的所有本地文件拉入.chm,无论它们是否是其他HTML文件,图形,级联确保你的脚本文件和CSS也被编译到你的CHM中。


为了更加确定所有图形(和* .css等层叠样式表)被编译成.chm,您可以在项目(.hhp)文件的[FILES]部分列出它们。使用HTML Help Workshop,过程如下:


1)单击"项目"选项卡上的"添加/删除主题文件"按钮。
2)单击"添加"。
3)在"文件名"字段中,键入* .gif(或* .jpg)。
4)单击"打开",然后选择要添加的图形文件。


如果需要,可以使用[FILES]部分中的通配符指定给定的每个文件目录。例如:


[FILES]
html \ * .htm
images \ * .gif
css \ foobar.css


当然,您必须在文本编辑器(如记事本)中编辑项目文件才能执行此操作并再次编译。请注意,所有文件必须位于项目文件"文件夹级别"。或者在子文件夹结构级别。


Hi,
I would like to add html files AND CSS files into one Chm file.
Is it possible ?

解决方案

Do you have all the project and source files of the resulting CHM file?

If YES - you can. Otherwise you have to decompile and recreate the project files.
You know, it's recommended creating clean HTML files by using CSS.

Some additional information for you adding your CSS file to the [FILES] section like described below.

The help compiler tries to pull into the .chm all local files that are *directly* referenced in the HTML files, whether they be other HTML files, graphics, cascading style sheets, etc. Make sure your script file and CSS is compiled into your CHM too.

To make extra certain that all graphics (and Cascading Style Sheets like *.css) are compiled into the .chm, you can list them in the [FILES] section of your project (.hhp) file. With HTML Help Workshop, the procedure is as follows:

1) Click the Add/Remove Topic Files button on the Project tab.
2) Click Add.
3) In the File Name field, type *.gif (or *.jpg).
4) Click Open, and then select the graphics files to add.

If you want, you can use wildcards in the [FILES] section to specify every file in a given directory. For example:

[FILES]
html\*.htm
images\*.gif
css\foobar.css

Of course, you'd have to edit the project file in a text editor such as Notepad to do this and compile again. Note that all files must be on the project file "folder level" or in subfolder structure level.


这篇关于我们可以将CSS文件集成到CHM文件中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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