淘先锋技术网

首页 1 2 3 4 5 6 7
ipad ui框架

ipad ui框架

Want to test drive iPad without heading over to an Apple store?  Here’s a way you can experience some of the iPad UI straight from your browser!

是否想在不前往Apple商店的情况下试驾iPad? 您可以通过这种方式直接从浏览器中体验一些iPad UI!

The iPad is the latest gadget from Apple to wow the tech world, and people even waited in line all night to be one of the first to get their hands on one.  Thanks to a simple JavaScript trick, however, you can get a feel for some of its new features without leaving your computer.  This won’t let you try out everything on the iPad, but it will let you see how the new lists and pop-over menus work just like they do in the new apps.

iPad是苹果公司最新发布的让科技界赞叹的产品,人们甚至整夜都在排队等候,成为第一批亲身体验的人之一。 但是,由于有一个简单JavaScript技巧,您无需离开计算机就可以体验其一些新功能。 这不会让您尝试iPad上的所有功能,但可以让您看到新列表和弹出菜单的工作方式,就像它们在新应用程序中一样。

Test drive the iPad’s UI from your browser

从浏览器试驾iPad的UI

Normally, the Apple iPhone developer library online looks like a standard webpage.

通常,在线的Apple iPhone开发人员库看起来像一个标准网页。

image

But, on the iPad, it looks and feels like a full-blown native iPad app.  With a nifty JavaScript trick from boredzo.org you can use this same interface on your PC.  Since the iPad uses the Safari browser, we ran this test in Safari for Windows.  If you don’t already have it installed, you can download it from Apple (link below) and setup as normal.

但是,在iPad上,它的外观和感觉就像是成熟的本机iPad应用程序。 借助boredzo.org的精美JavaScript技巧,您可以在PC上使用相同的界面。 由于iPad使用Safari浏览器,因此我们在Windows的Safari中运行了该测试。 如果尚未安装,则可以从Apple下载(以下链接),然后按常规进行安装。

image

Now, open Safari and browse to Apple’s developer page at:

现在,打开Safari并浏览至Apple的开发人员页面:

http://developer.apple.com

http://developer.apple.com

image

Now, enter the following in the address bar, and press Enter.

现在,在地址栏中输入以下内容,然后按Enter。

javascript:localStorage.setItem('debugSawtooth', 'true')
图片

Finally, click this link to go to the iPhone OS documentation.

最后,单击此链接转到iPhone OS文档。

http://developer.apple.com/iphone/library/iPad/

http://developer.apple.com/iphone/library/iPad/

After a short delay, it should open in full iPad style!

短暂延迟后,它应该以完整的iPad风格打开!

图片

The left menu works just like the menus on the iPad, complete with transitions.  It feels entirely like a native application, instead of a webpage.  To scroll through text, click and pull up or down similar to the way you would use it on a touch screen.

左侧菜单的工作方式与iPad上的菜单相同,并带有过渡功能。 感觉就像是本机应用程序,而不是网页。 要滚动浏览文本,请单击并向上或向下拖动,类似于在触摸屏上使用它的方式。

Some pages even include a pop-over menu like many of the new iPad apps use.

像许多新的iPad应用程序一样,某些页面甚至包含弹出菜单。

射门296

Note that the page will be rendered for the size of your browser, and if you resize your window the page will not resize with it.  Simply press F5 to reload the page, and it will resize to fit the new window size.  If you resize your window to be tall and narrow, like the iPad in horizontal mode, the webpage will change and the left menu will disappear in lieu of a drop-down menu just like it would if you rotated the iPad.

请注意,页面将根据浏览器的大小呈现,并且如果您调整窗口的大小,则页面将不会随之调整大小。 只需按F5重新加载页面,页面就会调整大小以适应新的窗口大小。 如果将窗口调整为既高又窄的大小(例如水平模式下的iPad),则网页将发生变化,并且左侧菜单将代替下拉菜单消失,就像旋转iPad时一样。

射击300

This works in Chrome as well, since it, like Safari, is based on Webkit.  However, it didn’t seem to work in our test on Firefox or other browsers.

这也适用于Chrome,因为它与Safari一样,都是基于Webkit的。 但是,在我们在Firefox或其他浏览器上的测试中,它似乎不起作用。

图片

We’ve previously covered how you can experience some of the iPhone’s UI with the online iPhone user guide.  Check it out if you haven’t yet:

之前,我们已经通过在线iPhone用户指南介绍了如何体验iPhone的某些UI。 如果还没有,请检查一下:

View Mobile Websites in Windows with Safari 4 Developer Tools

使用Safari 4开发人员工具在Windows中查看移动网站

图片

Conclusion

结论

Although this doesn’t let you really try out all of the iPad’s interface, it at least gives you a taste of how it works.  It’s exciting to see how much functionality can be packed into webapps today.  And don’t forget, How-to Geek is giving away an iPad to a random fan!  Head over to our Facebook page and fan How-to Geek if you haven’t already done so.

尽管这不能让您真正尝试iPad的所有界面,但至少可以使您了解它的工作方式。 令人兴奋的是,今天可以在Web应用程序中打包多少功能。 而且请不要忘记,How-to Geek正在将iPad随机赠送给粉丝! 如果您还没有这样做,请转至我们的Facebook页面,并扇动How-to Geek。

Win an iPad on the How-To Geek Facebook Fan Page

在How-To Geek Facebook粉丝页面上赢取iPad

翻译自: https://www.howtogeek.com/howto/14724/experience-the-ipad-ui-on-your-pc/

ipad ui框架