Apple Browser app (i)

Source: Internet
Author: User

The friendly interface and good compatibility of Apple browser are described in the previous section. can now enter the actual combat phase.

Teacher teaches: Do not invent the Ming wheel again when designing. is to inspire us to take take doctrine.

Like JS in a lot of ready-made applications. We'll just have to 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 into the application of Falsh can first smoke a cigarette wait (answer: can not use as much as possible).

Suppose there are good tools or platforms. Programming can be simple and easy. The first combat begins with the menu design:

Figure 1:

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvd3dqawfubgfv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">

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> start typing <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. For convenience here with SS. can also be so <caidan>, but remember to end with </ss></caidan> 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>

Change the menu text in the program into a menu with an icon:

<ss> Menu design One </ss>
<ss> Menu design Two </ss>
<ss> Menu design Three </ss>


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

Implementation conditions for example with:



watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvd3dqawfubgfv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">



Accompanying description: Chinese and English novels share the same reader.

Self-active paging, self-generated chapter index, simulation of book-flipping effect.




Apple Browser app (i)

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.