Sunday, October 25, 2009

Dreamweaver realizes many resolution layer fixed position

1, above all you need to download a plug-in unit that the name is CenterLayers 2.3 to Www.macromedia.com website (the register on preexistence website) before download, size is 8KB (you also can pass our website leave a message to ask for this plug-in unit originally! ) . Use Exention Manager next plug-in unit mount. The new Dreamweaver that start makes plug-in unit effective, the layer that fixed position needs in set page is Layerl, build a hyaline layer again, set be Layer2 and make its move to the window in the center of, after signing the yellow color patch that represents Layerl pitch on, procrastinate to Layer2 in, adjust the position of good Layerl.

2, pitch on Layer2, from " Window " menu midpoint " Behaviors " open " behavior Control Panel " , click " + " date, can see Centerlayer 2.3 command has appeared in the bill of fare that open, click this command, appear one dialog box, be in " Name Layers " the Layer2 in be chosen, below " Ccenter Horizontal " and " Center Vertical " options expresses to be able to make layer fixed position is in the level of browser window or perpendicular center position, if both is hit,tick off, criterion the midpoint that Layer2 layer can be in the window, we need a level only here locally fixed position, with respect to pitch on " Center Horizontal " , nod again " OK " of the JavaScript that finish found.

3, next we should undertake necessary adjustment, because " Behaviors " the incident attribute with acquiescent face plate is " OnClick " , preview the ability when clicking Layer2 to be able to make the layer moves when you only that is to say to the window in the center of, so we need the OnClick="BW-centerLayers 0" pitch on in code of layer of source code lieutenant general to move to " " among, again will " OnClick " incognito for " OnLoad " , let BW-centerLayers 0 function be carried out namely when page to load namely, so far the fixed position that we basically finished layer Layerl.

4, still have a bit, when the browser acquiesce opens a value is not the biggest change and need manual place " the biggest change " when pushbutton, layer2 layer cannot follow the change of the window however and make adjust, need refresh to just can move to the window in the center of, how to do? Did not forget we still have " OnResize " movement, pitch on " OnLoad=" BW_centerLayers 0" " duplicate and stickup come here at the back of the movement. Again will " OnLoad " incognito for " OnResize " , carry out two incident in the meeting when page to load so, namely " OnLoad " and " OnResize " . OK! Open a browser to be previewed with different resolution. You can discover " layer " had become very obedient.

 

No comments:

Post a Comment