Thursday, October 22, 2009

In realizing a webpage to make " layer " the unique skill of exact location

   In the webpage that make when, we often can mention a layer. The layer here is to point to in Dreamweaver, the result that achieves webpage object to overlap each other in perpendicular direction through coming to its application, the friend that uses QQ for instance has been browsed to Tecent homepage certainly, its fall pull menu to have distinguishing feature very much, this uses the application of the layer to come true namely. Its way is very simple, many netizens use a layer to be able to come true easily in the webpage, but whether do you notice when you change monitor resolution, your layer or before locally, can the webpage get used to the resolution that the user installs automatically? If you do not know the concept of the absolutely fixed position of the layer and relative fixed position,I think, you are not to do those who give Tecent homepage to go up to issue those who play menu effect, with respect to union example introduces one lower to locate accurately below.

Way one: Form location method

Measure 1: Open Dreamweaver3, build a page, use shortcut key " Ctrl+Alt+T " insert two form, setting the 2nd goal is to lay a layer, make its locate relative to form. Input character installs form attribute at the same time.

Measure 2: cursor immigrant in the 2nd form, in this inserts a layer in travel, open its attribute face plate, l, T the value is deleted, make its are empty.

These two parameter cannot have numerical value absolutely, otherwise will cannot realize an exact location. Of course at this moment layer parameter already was decided, when regarding father as the layer this cannot move, but can use cursor to change its size.

Measure 3: cursor the definition is in father layer, insert a layer again and install a content. Can see when your use F2 opens a Control Panel be located in father layer next child layer, as child the layer is to be able to procrastinate move, because it is opposite,locate at father layer.

Measure 4: For entree sheet setting mouse answers incident, show move to mix when the mouse the indication means of the layer when leaving this entree sheet is OK. F12 is previewed and change resolution, look whether your child menu does not have wrong place.

Way 2: CSS location method

Afore-mentioned methods are not the expectation of professional stylist after all, we can make the definition way that a CSS locates relatively, model of will relative fixed position (for instance form) the definition is this CSS attribute.

Measure 1: Make the browser serves as origin with top left corner of model of relative fixed position, building new coordinate is. Locate relatively in this again the model is inferior insert a layer, those who make is absolutely locate at model of this relative fixed position. Of course this also are to cannot procrastinate those who move, it is OK to change its position the numerical value that inputs Left Top on its attribute face plate directly.

Measure 2: By " Shift+F11 " open CSS Styles face plate, click " New Style " pushbutton, in the definition in playing the New Style window that give a name is the CSS attribute of.pos, and select the Define kind of the Type type of Make Custom Style and This Document 0nl, affirm enter window of Style Defintion For.pos, choose Positioning to define Type to decide for Relative.

Measure 3: Choose the form that has defined, right key clicks the.pos in CSS Style face plate, apply is carried out to command in playing a menu can. Make should locate relatively model (form) building new coordinate is, want our amid to insert a layer only, the mouse that installs a content and entree sheet answers incident to be able to make the layer realizes relative fixed position.

Above two action, everybody mights as well try, be like the word of draw inferences about other cases from one instance, can make all sorts of use layers certainly and the webpage effect that self-reacting user resolution installs comes!

No comments:

Post a Comment