Apple control's 9.24 day

Source: Internet
Author: User

Apple control is the independent project of the team. Use phonegap of xcode for hybrid development. For iPhone

-------------------------------------- Interface created today --------------------------------------

Bytes -------------------------------------------------------------------------------------------------------

1. pay attention to the elastic layout of cross-platform development. At the beginning, I used common web pages to make examples. I can use <A>, <div> <p> and other labels for each block. When I want to convert these labels into two rows in one row and two rows in total, use float: Left; very useful. But in the hybrid development process. Float: the use of left is really incredible. When I transfer a good web version to hybrid development. Because I use a hybrid development framework. Therefore, the elastic layout is well laid out. Similar frameworks

<! Doctype HTML> <HTML lang = "en"> 

I only need to change the 123 content of the <div> 123 </div> location, at the beginning, I thought that I could directly Delete 123 blocks from my web page and set them in. Later, I found that the Code on the page on the simulator could not be extended in the future, so I tried to change CSS and then made it into four divs and then float, but the problem at this time became that all divs were miraculously lost, -- in fact, a div is actually a line. Of course, the DIV width needs to be changed to 100%, adding two row attribute labels in this row can be changed to one row and two rows. Therefore, I need to add two row attribute labels to each Div of two divs. In the future, I need to add divs to the extension. otherwise, all the small parts will disappear or they will not be extended in the future.

2. How can I use JavaScript to control the animation involving css3? Because the effect I want to do is to come out one by one and then bring a gradient animation, because the gradient animation of jqmoble will not be stuck on a cross-platform with the native JQ, we can only use the animations of css3. JS-linked css3 animations use the setattribute of Javascript DOM to add a class for the expected inner Div. The added class attribute and the animation value can be linked to the css3 animation.

for (i=0;i<as.length;i++)        {            if(b==i)            {                as[i].style.display="block";                /*as[i].style.cssText*/                as[i].setAttribute('class','bbb')            }        }        
.bbb{    -webkit-animation: aaa 0.2s ease ;    }@-webkit-keyframes aaa {    0%{                opacity: 0.1;    }    20%{                opacity: 0.2;    }    40%{                opacity: 0.4;    }    60%{                opacity: 0.6;    }    80%{                opacity: 0.8;    }    100%{                opacity: 1;    }}

3. When writing multi-layer effects, the layout must be clear. Otherwise, when each block wants the best effect. When margin and padding are used in disorder, the simulated display effect is different from that on the web page ~

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.