0 or one More information
1. http://www.w3school.com.cn/h.asp
2. Http://www.imooc.com/learn/33 # Feel this is still a bit difficult, you can see some other video materials. "Mu class net" nice~
First, preface
First, declare yourself. Both JS and CSS belong to, so-so-so. Only yesterday found that the original page JS can be written like this.
(function (window) {function Aax (str) {alert (str); } Window.aax = Aax;}) (window);//This should be a closed bag. The window is then passed in as a parameter,//and then you can use the Window.axx () function in the window global variable of the current page//and then Lenovo to the document, can't help feeling the original is this look
It was also yesterday that we knew what the value of position in CSS meant. and Display:block set the div as a "block" element to set the length and width.
In fact, I said that the purpose is: The road long its repair far, learning no shortcut, not afraid of their own things. As long as you work hard, there must be no problem.
Then you can publish some feelings. Ask the canal that is clear so, for have fountainhead come.
H5 made the page is really super beautiful. But in order to install in front of colleagues and friends, or should be familiar with. Then you can tell them: is not the CSS3 new animated properties, add a bit of JS things, it is not difficult! ^_^ saw a H5 of the afternoon yesterday. http://www.epub360.com/manage/book/o1dcvl/#page/page_13853534097181 for the first time to see, may feel more dazzling, once the aesthetic fatigue, feel that is so back to the matter. First, as a non-front-end personnel, to throw away the gorgeous material, to analyze the internal implementation principle.
The more you observe, the more you will find. There will be a progress bar or similar loading interface (you will know the comparison pits later). And then there will be some background music control, the individual also has the video (do not worry, is the interface that H5 provides, need to look at the document is similar); Then there is the excessive between the pages, this part may use the zoom, the transparency transformation, and the simple animation effect.
Second, dry goods1. About Loading progress bar
is so so-called, do not see not know, a look startled. Before, you have been in doubt, how this load progress is obtained. HTML markup Language, which must be loaded by all DOM structures before the browser is shown back.
below Code snippet is obtained from a mobile phone H5 page, is not found what function startloading () { // simulate loading something. var simulationfn = function (instance) { var progress = 0, // every 80 milliseconds, Execute the function once interval = setinterval ( function () { // Latest Progress = Gets a minimum value (last progress +[0, 0.1), 1), This generates the current progress increment progress = math.min ( progress + math.random () * 0.1 , 1 ); instance.setprogress ( progress ); &nbSp;// reached the end if ( progress === 1 ) { classie.remove ( container, ' loading ' ); classie.add ( container, ' loaded ' ); // when the progress bar When is 1 , the progress bar is loaded. Perform subsequent page operations Clearinterval ( interval ); var onendheaderanimation = function (EV) { if ( support.animations ) { if ( ev.target !== header ) return; This.removeeventlistener ( animEndEventName, onEndHeaderAnimation ); } classie.add ( document.body, ' Layout-switch ' ); window.removeeventlistener ( ' scroll ', noscroll ); }; if ( support.animations ) { header.addeventlistener ( animendeventname, onendheaderanimation ); } else { onendheaderanimation (); } } }, 80 ); }; LOADER.SETPROGRESSFN ( simulationFn );} Take a look at the others first.2. Background music
<! Doctype html> 3.CSS3 new animations, CSS3 new animations, CSS3 new animations (the point)Let's do it first.
<! Doctype html>
Introduction to Mobile End H5 development