Changes

Jump to navigation Jump to search
5,386 bytes added ,  14:33, 28 March 2013
translate 20%
3DS网络浏览器是在2011年6月更新的功能(JPN/EUR/USA)

从网络浏览器的说明/帮助字段可知:
完全遵循 LGPL,OSS源代码可以从任天堂网站获得.
下载地址:[http://mediacontent.nintendo-europe.com/NOE/images/service/OpenSources.zip]

3DS网络浏览器 [http://en.wikipedia.org/wiki/Netfront Netfront] Browser NX v1.0 基于 [http://en.wikipedia.org/wiki/WebKit WebKit] 引擎。

3DS网络浏览器可以存储 64 个书签。

User-agent 示例:
* '''Mozilla/5.0 (Nintendo 3DS; U; ; fr) Version/1.7412.EU''' ''for a EUR/fr Nintendo 3DS''
* '''Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7455.US''' ''for a USA/en Nintendo 3DS''
* 版本标号仅为示例...



==Web标准==
*HTML 4.01
*HTML 5 (120/400 score on [http://www.html5test.com HTML5Test.com])
*XHTML 1.1
*CSS 1
*CSS 2.1
*CSS 3 (some functionality is unavailable)
*DOM Levels 1-3
*ECMAScript (partial support for ECMA-262 5th Edition)
*XMLHttpRequest Level 2
*Canvas Element (some functionality is unavailable)

==网络协议==
*HTTP 1.0
*HTTP 1.1
*SSLv3
*TLS 1.0

==图像格式==
*[[File_Formats|MPO]]
*GIF
*JPEG
*PNG
*BMP
*ICO (不完全支持)

==插件==

不支持插件 (比如 Flash)

==其他细节==

*It scored 90/100 on [http://acid3.acidtests.org/ Acid3] test
*Images from the Internet can be saved to the [[SD Filesystem|SD Card]] and viewed using the [[Nintendo 3DS Camera]] application.
*Images saved to an [[SD Filesystem|SD Card]] or to the Nintendo 3DS system memory can be uploaded to blogs or other sites that allow the uploading of photos using :
<input type="file" />
* HTML5Test.com say that Drag and drop is supported but it's not (code on WebKit is ready, but it's not implemented on interface of browser)

==Tips==

=== Detect User Agent ===

To detect if the user agent is Nintendo 3DS Browser :

<script type="text/javascript">
if (navigator.userAgent.indexOf('Nintendo 3DS') == -1) { //If the UserAgent is not "Nintendo 3DS"
location.replace('http://www.3dbrew.org'); //Redirect to an other page
}
</script>

* You can check <em>navigator.platform=="Nintendo 3DS"</em> as well.

=== Scrolling ===

Scrolling can be altered by modifying <em>document.body.scrollTop</em> and <em>document.body.scrollLeft</em>. However, there are drawbacks related to working with these properties:

* Both properties return 0 when accessed
* Setting one property resets the other property's scroll position

In order to set both at the same time (without either resetting to 0), use <em>window.scrollTo</em>.

=== Events ===
==== Key Events ====
The following buttons trigger the <em>onkeydown</em>, <em>onkeypress</em> and <em>onkeyup</em> events:

{|class="wikitable" width="20%"
! Code !! Button
|-
| 13 || A
|-
| 37 || Left
|-
| 38 || Up
|-
| 39 || Right
|-
| 40 || Down
|}

The events cannot have their default action cancelled. Other buttons do not trigger key events.

==== Touch/Mouse Events ====
<em>onmousedown</em>, <em>onmouseup</em> & <em>onclick</em> are all triggered by the browser. However, the <em>onmousedown</em> event doesn't trigger until you lift the stylus or you've held it on the screen for ~2 seconds—which is when text selection mode is activated—making it pretty much the same as <em>onmouseup</em>. The events cannot have their default action cancelled.

The <em>onmousemove</em> and common touch/gesture events are not supported.

== Screen Resolution ==

The up screen resolution is 400×240. However, the viewable area in the browser is only <b>400×220</b>.

The touch screen resolution is 320×240. However, the viewable area in the browser is only <b>320×212</b>.

You can have a page span both screens. However, the browser will behave as if the bottom screen is the only active screen and the top screen is scrolled off. This is important when computing CSS coordinates. Items positioned from "bottom" will be positioned based on 220px and not the full 432px of both screens.

== Using Both Screens ==

Generally the easiest way to accomplish the correct layout is to create HTML elements that "contain" the top and bottom screens. Here's an example:

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=400">
<style>
body { margin: 0px; }
#topscreen { width: 400px; height: 220px; overflow: hidden; }
#bottomscreen { width: 320px; height: 212px; overflow: hidden; margin: 0 auto; }
</style>
</head>
<body>
&lt;div id="topscreen">Top Screen&lt;/div>
&lt;div id="bottomscreen">Bottom Screen&lt;/div>
</body>
</html>

This scheme allows the page to be easily manipulated through JavaScript. In order to have the window snap to the correct position, use the following JavaScript code:

window.setInterval(function () {
window.scrollTo(40, 220);
}, 50);

This automatically resets the position if the user accidentally scrolls the page.

==Example Sites==
<!-- If you have a website that demonstrates these techniques, place it here! -->
* [http://geekshadow.com/gaming/dev/weaponscolors/3DS/ Weapons and Colors] (Short URL for 3DS : http://bit.ly/3DSwc)
* [http://3ds.andysmith.co.uk/jFox.html jFox] (Short URL for 3DS : http://bit.ly/iB7FqW)
* [http://ditto3d.com/3ds Ditto3D]
* [http://www.nintendo.com/3ds/internetbrowser/bookmarks Nintendo 3DS Bookmarks] - This is the first bookmark pre-installed in the browser.
155

edits

Navigation menu