Dreamweaver 4 concise tutorial (7. Web page layout 3)
Author:Eve Cole
Update Time:2009-05-30 18:35:47
Use of layers
If you feel that using tables to position page elements is too difficult to master, you might as well try using the good thing of layer. Click on the properties panel button, the cursor will become a cross, and drag it on the editing window to create a layer. We can enter most web page elements on the layer, such as pictures, text, etc. The advantage of layers is that they can be placed anywhere on the page, as shown below:
After selecting a layer, the corresponding property panel is as follows:
① Layer ID: The name of the layer, used to identify different layers;
② L, T: The position of the layer, L is the distance from the left edge of the page, T is the distance from the upper edge of the page;
W, H: width and height of the layer;
③ Z-Index: Z-axis order of layers;
④ Bg Image: background image of the layer;
⑤ Vis: The display state of the layer, where Hidden hides the layer and makes it invisible;
⑥ Bg Corlor: The background color of the layer;
⑦ Tag: The code method used by the layer. Generally, the default DIV can be used;
⑧ Overflow If there are too many texts in the layer, or the picture is too large, and the size of the layer is not enough to display all, you can choose:
visible: The exceeded part is still displayed;
hidden: The excess part is hidden;
scrool: The scroll bar will be displayed regardless of whether it is exceeded;
auto: The scroll bar will appear only when it exceeds the limit;
For example, if we select auto, the layer in the above example will be displayed as:
The advantages of layers are obvious, but the disadvantages are equally obvious. For example, it is difficult to create a web page that adapts to different resolutions; when a page uses multiple layers, the complexity of the page increases, making editing very cumbersome; editing status and browsing status There are quite obvious differences in the actual effect. Usually people use Layer for typesetting and then convert the layer to a table (Modefy > Convert > Layers to Table). The specific operation will not be described here. You can try it yourself.