As mentioned earlier is a document, you can use it to create multiple pages that share the same layout, then the library is a page element stored in the entire Web site repeatedly or frequently updated.
For example, you will use the library project: Your company is going to build a website, but there are many problems that cannot be accurately defined, such as how much navigation bar, the company's contact information, copyright instructions are uncertain, this time, you You can use the library to do a sample. When you finalize, you can update the documentation of the entire site with just change the library file.
You can create library items in any element in the Body segment of the document, including text, form, form, Java applet, plugin, ActiveX control, navigation bar, and image.
You may have questions, if I built a library, inserting the library file in other documents, there is no problem with the path error, just like the picture does not display, hyperlink is wrong. This point you don't have to worry, Dreamweaver's designers will not ignore this problem. For link items such as images, libraries will only store one reference to the project. As long as you don't move the location of the image, just let the picture save in the specified place, there will be no problem.
Dreamweaver stores library projects in the library folder under each site root, and each library project is saved as a standalone file (file extension is .lbi). Every site has its own library, you can use the "Resource" panel "copy to the site" command to copy a site library project to another site. I don't recommend you to do this because if the library project contains a link, the link may not work in the new site. There is also the image in the library project will not be copied to the new site.
Note that the library project cannot contain a timeline or a style sheet because the code of these elements is part of the HEAD segment, and the library is created by some elements in the Body section. The elements in the document HEAD segment cannot be saved as library projects, and the library project can only contain elements in the body.
The library can include behavior, but there are some special requirements. To edit the behavior in the library project, you'd better insert the project into the document, and then make the item to edit it in the document. After you do all the modifications, rebuild the library project, and use the edited library project replacement The corresponding item in your document. To make the items in the document editable, you can click "Separation from Source File" in the "Properties" inspector.
If you want to build a website, you can use the template and library is a good habit, which will make your site easier to maintain. This article does not talk about the specific operation of the library file, because the operation of the library and template is similar, and you can refer to the template and library volume of the web page (middle) "in another article.