Mobile website development-viewport-display page by mobile phone size, website development-viewport-
I am writing a mobile phone webpage recently. Two methods are summarized:
1. The webpage width can be fixed to 640px, and the page is displayed on different mobile phone pages using viewport.
Insert script code into t
function GetViewport () { var w = window.innerwidth? window.innerwidth: Document.documentElement.clientWidth? document.documentElement.clientWidth: document.body.offsetWidth; var h = window.innerheight? window.innerheight: document.documentElement.clientHeight? document.documentElement.clientHeight: document.body.offsetHeight; return { width:w, height:h };}; GetViewport () JavaScript Gets the
Recently on the mobile phone page, summed up two methods1. Web page width can be fixed to 640px, and then use viewport to implement the page display on different phone pagesInsert script code in Web page2. Cut the chart by percentPage, addmetaname="viewport"content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>Mobile Website Development-view
Because it is only for uinty to develop plug-ins, there is no systematic learning of unity, many of unity's functions are not very understanding, kidnap other unity colleagues ' patience to teach, not want to collapse. Keep a record and avoid repeating mistakes.Ngui can create a camera with a specified viewport size, as long as you add a 2D UI or 3D UI, you can modify the
Window sizeThere are three ways to determine the size of the browser window (the viewport of the browser, excluding toolbars and scroll bars).For Internet Explorer, Chrome, Firefox, Opera, and Safari:
Window.innerheight-Interior height of the browser window
Window.innerwidth-Interior width of the browser window
For Internet Explorer 8, 7, 6, 5:
Document.documentElement.clientHeigh
[Original] Why choose iPhone 5 Resolution as H5 visual draft size, iPhone 5h5
It's another 520 million online Valentine's Day in a year, but it's raining heavily in Shenzhen. This rain can only be the tears of a bachelor. For me, this day is of special significance and I miss my father, secondly, I can barely express my love for my wife. so, the image width in th
iphone for the first generationIn 2007, the first iphone was released and the screen was 480 pixels wide. The following are arranged in the order of width and height. This resolution has remained the same for the iphone 3GS.At that time, iOS apps (apps) were written to support absolute targeting only. For example, a button (x, y, width, height) = (20, 30, 40, 50)
Original: Http://www.niaogebiji.com/article-4379-1.html?utm_source=tuicool
iphone for the first generationIn 2007, the first iphone was released and the screen was 480 pixels wide. The following are arranged in the order of width and height. This resolution has remained the same for the iphone 3GS.At that time, iOS apps (apps) were written to support
ratio is not the same, you can roughly think IPhone5, 5s, 6, 6+ aspect ratio is the same, you can scale,Although there are subtle differences, it is basically not visible. All design interface design only two sets should be OK, a set with the largest resolution iphone6+ 1920*1080 design, a set of iPhone4 and 4s 960*640 design. It's best to keep two sets of UI transduction in the program to meet all the iphone devices on the market. Of course have mor
Sizes of iPhone UI elements
Element
Size (in points)
Window (including status bar)
320x480 PTS
Status Bar(How to hide the status bar)
20 PTS
View inside Window(Visible status bar)
320x460
Navigation Bar
44 PTS
Nav bar image/Toolbar Image
Up to 20x20 PTS (transparent PNG)
Tab bar
49 PTS
Tab bar icon
Up to 30x30 P
The physical resolution and screen size of the iphoneUnderstanding the physical resolution and screen size of the iphone is essential in iOS development. Here's a list of the physical resolution and screen sizes of all iphone devices on the market.
The physical resolution of the
Document directory
Points vs. pixels
Adjusting sizes
Additional references
The size of the iPhone interface elements, which are reprinted for query.
Original article address:
Http://www.idev101.com/code/User_Interface/sizes.html
Element
Size (in points)
Window (including status bar)
320x480 PTS
Status Bar(How to hide the
APP size, remove the status bar
Cgrect r = [uiscreen mainscreen]. applicationframe;
R = 320,460
Screen Size
Cgrect RX = [uiscreen mainscreen]. bounds;
R = 320,480
Status Bar size
CGRect rect;rect = [[UIApplication sharedApplication] statusBarFrame];
How to obtain screen resolution in iPhone
Cgrect rect = [[uiscreen
前提修改文档声明,如有疑问,请看文章手机web2.0网页文档属性@media screen and (max-device-width: 320px){body{-webkit-text-size-adjust:none}}@media screen and (max-device-width: 480px){body{-webkit-text-size-adjust:none}}@media only screen and (-webkit-min-device-pixel-ratio: 2){body{-webkit-text-size-adjust:none}}@media only screen and (min-device-width: 768px) and (max-device-width: 1024px
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.