Apple Browser app (i)

Source: Internet
Author: User

The friendly interface and good compatibility of Apple browser are described in the previous section. Now it's time to get into the actual combat phase.

Teacher teaches: Do not reinvent the Ming wheel when designing. That is to encourage us to take take doctrine. Like many of the ready-made applications in JS, we can just use them. But not necessarily,

such as: Why not jquery? In particular, the Apple browser good local system support, do not consider uploading, download. It is easy and quick to use on the hard drive (answer: use with ease).

So why not falsh the apple system? Now the speed of the computer is not very different, in the past, the personal feeling loaded with FALSH application program can first smoke a cigarette wait (answer: can not use as much as possible).

If you have a good tool or platform, programming can be simple and easy. The first combat begins with the menu design:

Figure 1:


Figure 1 is the Apple Browser interface: A simple address bar plus a toolbar. Leave most of the space to the user to play.

I don't know if you noticed. The toolbar is more like a line of text than a menu. So, let's use a line of text to design a set of menus:

Start at <body> enter <ss> menu design </ss><ss> menu Design two </ss><ss> menu design three </ss>

The description is marked in parentheses, try not to have the same name as the JS tag. In order to facilitate the use of SS here, can also be so <caidan>, but remember to use </ss></caidan> end like a label.

The tag is then labeled to display attributes (color, mouse shape, and so on). Three sets of menus are finished, blue text. Next, arrange the drop-down boxes and menu contents.

Here is the source program:

<meta charset= "gb2312" >
<style>
#ssmenu {position:fixed;top:0px;left:10px;height:20px;width:800px;}
. mmenu {position:fixed;top:20px;left:10px;width:auto; height:auto;display:none;
border:1px solid #ccc; Overflow-y:auto;background: #ffc; z-index:1;}
. Mmenu Li{list-style:none;display:none;cursor:pointer;}
. Mmenu Li:hover{background:pink;}
SS {font-size:14px;padding-left:10px;padding-right:10px;color:blue;font-size:12px;}
Ss:hover{color:brown;background: #acc;p adding-top:3px;padding-bottom:3px;}
</style>


<script type= "Text/javascript" src= "Jquery.min.js" ></script>
<script type= "Text/javascript" >

$ (document). Ready (function () {
var Mnu1=document.getelementbyid ("menu1");
var mstr= "<li>janaic.html</li><li>rebecca.html</li><li>deceptpoint.html</li >
Mnu1.style.left= "10px";
mnu1.innerhtml=mstr+ "var Mnu2=document.getelementbyid ("Menu2");
Mnu2.style.left= "110px";
mnu2.innerhtml=mstr+ "var Mnu3=document.getelementbyid ("Menu3");
Mnu3.style.left= "210px";
mnu3.innerhtml=mstr+ "});


$ (function () {
$ ("#menu1"). Hover (
function () {
$ ("#menu1"). Show ();
},
function () {
$ ("#menu1"). Hide ();
});
$ ("#menu2"). Hover (
function () {
$ ("#menu2"). Show ();
},
function () {
$ ("#menu2"). Hide ();
});
$ ("#menu3"). Hover (
function () {
$ ("#menu3"). Show ();
},
function () {
$ ("#menu3"). Hide ();
});
});


$ ("#ssmenu ss:eq (0)"). Live ("hover", function () {
$ ("#menu2"). Hide ();
$ ("#menu3"). Hide ();
$ ("#menu1"). Show ();
$ ("#menu1 Li"). Show ();
});
$ ("#ssmenu ss:eq (1)"). Live ("hover", function () {
$ ("#menu1"). Hide ();
$ ("#menu3"). Hide ();

$ ("#menu2"). Show ();
$ ("#menu2 Li"). Show ();
});
$ ("#ssmenu Ss:eq (2)"). Live ("hover", function () {
$ ("#menu1"). Hide ();
$ ("#menu2"). Hide ();
$ ("#menu3"). Show ();
$ ("#menu3 Li"). Show ();
});

$ (' #menu1 Li '). Live ("Click", Function (e) {
E.preventdefault ();
var fname=$ (this). text ();
Location.assign (fname);
$ ("#chaptMenu"). Hide ();
});


</script>


<body>
<div id= "menu1" class= "Mmenu" ></div>
<div id= "menu2" class= "Mmenu" ></div>
<div id= "Menu3" class= "Mmenu" ></div>
<div id=ssmenu>
<ss> Menu Design </ss><ss> menu Design two </ss><ss> menu design three </ss>
</div>
</body>

Click the hand mouse to run the "deceptpoint.html" Web file (the novel file on the local disk).

Operating conditions such as:






Accompanying description: Chinese and English novels share the same reader. Automatic paging, auto-generation of chapter index, simulation of book-flipping effect.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.