Dreamweaver from since going out, its are handy use easily and the function is powerful " behavior " (Behavior) is one of heat that everybody pays close attention to all the time. In Dreamweaver MX(DW MX) , had again to this one function augment and improve.
In DW MX, what behavior points to is to answer some incident (Event) and an adopted operation (Action) . Among them the incident that what Event points to is a browser, window refresh, mouse is for instance mobile wait. And what Action points to is the JavaScript code that tiring-room answers incident, can complete corresponding operation, broadcast voice for instance, retroflexion the picture.
With DW MX the navigation that make falls pulling menu is one of specially good effect that often use in the webpage. (In if graph 1) is main,applying DW MX " Show-Hide Layers " behavior.
Graph 1
Make good navigation above all (graph 1 medium " product center " ) of that one column, add a layer subsequently, regard next pulling as the position that menu will indicate, write the corresponding column of menu.
Next, open " Behaviors " face plate, at the same time pitch on " product center " link (attention, this moment cannot the layer that enough pitch on just has built, cannot apply otherwise " Show-Hide Layers " behavior) , click " + " date, choose " Show-Hide Layers " , the layer that can see we just had been built is in options, can set perhaps shows to conceal (the 2) that be like a graph.
Graph 2
The magical function of behavior basically reflects in: If we want real at present to pull menu, the key lets a mouse move namely " product center " on the link when, make the layer shows; And when the mouse leaves a link, make the layer is concealed. According to this kind of thought, we establish two Action for this layer above all, one chooses Hide, one chooses Show. Next, adjust Event, set the Event of Hide Layer for OnMouseOut, leave a link for the mouse namely; And set the Event of Show Layer for OnMouseOver, it is link of mouse pitch on namely. By " F12 " preview, with respect to the effect that can see we are expected.
Such, it is OK that menu is pulled below the navigation that we feel very mysterious at ordinary times come true in behavior easily. Still can continue to apply on navigation link " Swap Image " behavior, the picture appears to retroflexion when implementation rat punctuation chooses a link the effect.
Behavior is not each isolated specially good effect, can combine overlay to realize complex function by many behavior, outside the action that besides DW MX acquiesce has set, we still can go up from Www.mcromedia.com download is more more the tripartite behavior of cruel, we need to duplicate them to fall to DreamweaverMX\Configuration\Behaviors\Actions\ catalog directly only can, make this one glitter of DW MX is nodded thereby more blindfold.

No comments:
Post a Comment