This article describes the toolbar that is related to menu design.
The menu described in the previous article has actually included the toolbar, just without adding a background to see it.
Add a background and add some real-world features such as
Figure 1: The light gray is the tool bar, Apple browser in full screen, the Address bar and toolbar is hidden, the mouse to the top of the screen is displayed. The toolbars you design should also be hidden when you need them.
Move the mouse to the toolbar in the blue "big font" point, change the font, the menu on the blue "big font" itself into the "small font, the body immediately becomes a small font." 2
Figure 2: The toolbar is missing and the font size becomes smaller. Because the text (fiction) is paginated, the scroll bar is not used (keep the screen neat).
Figure 3: The top right corner of the browser, click the transform Size, small screen display. Click "References" to load the translation file, and the text of any paragraph in the body is displayed in a small form.
Y
The toolbar and menu implementation steps are as follows:
First, add some content between the previous <style></style>:
. playmd{font-size:14px;height:25px;width:1024px;position:fixed; left:0px; Top:0px;background: #ddd; z-index:1;}
Then add the following <body>:
<div class= "Playmd" id= "Playmd" >
<ss> Documents </ss><ss> Chapters </ss><ss> references </ss>
<input id= "BT1" type= "button" value= "Refresh"/>
<ss> font </ss><select id= "fnt" size=1 onchange= "GetStyle ()" >
</div>
The menus and toolbars are roughly the way they appear.
function implementation process:
$ ("Ss:eq (1)"). Live ("Click", Function () {//SS:EQ (1) indicates that the SS menu (blue font) starts from left to right 0. such as EQ (1) is the "chapter" menu name.
CheckPage ();
$ (" #chaptMenu "). Show ();
$ ("#chaptMenu Li"). Show ();
});
$ ("Ss:eq (2)"). Live ("Click", Function () {
ileft.location= Chinesef;
});
$ ("Ss:eq (3)"). Live ("Click", Function () {
if ($ ("Ss:eq (3)"). Text () = = "Medium Font") {
GetElement ("Div1"). style.fontsize= "19PX";
GetElement ("Div2"). style.fontsize= "19PX";
$ ("Ss:eq (3)"). Text ("large font");
}
else if ($ ("Ss:eq (3)"). Text () = = "Large Font") {
GetElement ("Div1"). style.fontsize= "14px";
GetElement ("Div2"). style.fontsize= "14px";
$ ("Ss:eq (3)"). Text ("small font");
}
else if ($ ("Ss:eq (3)"). Text () = = "Small font") {
GetElement ("Div1"). style.fontsize= "17PX";
GetElement ("Div2"). style.fontsize= "17PX";
$ ("Ss:eq (3)"). Text ("Medium font");
}
});
Toolbar Hide Implementation:
$ ("Body"). MouseMove (function (e) {//probably means: if the mouse is less than how much (near the position of the toolbar) is displayed.
var Positiony=e.pagey,positionx=e.pagex;
if (Positiony <50) {
$ (". Playmd"). Show ();
}
else {
$ (". Playmd"). Hide ();
}
});
The size form transforms the implementation process:
$ (window). Resize (function () {
Initialize (); Initialize functions based on changing data (requires writing, i.e. a few lines of code)
ShowPage (); The function that displays the body;
});
Isn't it very easy?