為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

CSS3 'device-width' is not being recognised.

more options

CSS3 'device-width' is not being recognised by Firefox for Android - therefore, no CSS3 is being applied.

Please visit: http://www.liamobyrne.com/CycleMile%20-%20Copy/index.html

The 'device-width' is recognised by many mobile browsers, but not Firefox for Android.

Below is a section of CSS3 I have used:

/* Phone (Portrait/480px) */

@media only screen and (device-width:320px) and (orientation:portrait) {

/*style goes here*/ }

CSS3 'device-width' is not being recognised by Firefox for Android - therefore, no CSS3 is being applied. Please visit: http://www.liamobyrne.com/CycleMile%20-%20Copy/index.html The 'device-width' is recognised by many mobile browsers, but not Firefox for Android. Below is a section of CSS3 I have used: /* Phone (Portrait/480px) */ @media only screen and (device-width:320px) and (orientation:portrait) { /*style goes here*/ }

所有回覆 (5)

more options

Hi,

The people who answer questions here, for the most part, are other Firefox users volunteering their time (like me), not Mozilla employees or Firefox developers.

If you want to leave feedback for Firefox developers, you can go to the Firefox Help menu and select Submit Feedback... or use this link. (You'll need to be on the latest version of Firefox to submit feedback). Your feedback gets collected at http://input.mozilla.org/, where a team of people read it and gather data about the most common issues.

more options

Do you have Firefox 23 for Android?

Try this test page: http://dev.jeffersonscher.com/device-width.html

more options

@jscher2000, this is great. I am specifically targeting specific devices and this has just made it even easier.

more options

To make things more complicated, when I viewed the test page in the stock browser on Gingerbread, the detected width didn't change when rotating from portrait to landscape (the background color did change). I haven't tried any other browsers on this phone -- no more memory!

more options

Yes, I found this too. It seems like 'device-width' functions differently - dependent on the browser being used. I found that the Samsung Galaxy S4 Note 2 has a CSS3 resolution of 360x1080.