你用什么来测试你网站上的手持CSS?

发布于 2024-07-07 14:13:40 字数 202 浏览 10 评论 0原文

我一直在我的网站上添加对 handheld 的 css 支持,但一直无法找到一个好的测试工具。

我尝试使用 Firefox 的 webdeveloper 插件,但它对我不起作用。 也许这是因为我所有的 css 都在 html 中,而不是单独的 css 文件。

除了出去购买手持设备之外,还有其他可用的测试工具吗?

I've been adding css support for handheld to my website but haven't been able to find a good tool for testing.

I tried using the webdeveloper plugin for Firefox but it doesn't work for me. Maybe that is because all my css is in the html and not a seperate css file.

Are there any other testing tools available aside from going out and buying a handheld device?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

纸伞微斜 2024-07-14 14:13:41

要测试 iPhone,您可以在此处获取 iPhone SDK
但你需要 OS X / Apple 电脑才能以官方方式运行。

非官方/黑客:

  • 有多种方法可以让 OS X 在标准 PC 硬件上运行,例如 此处< /a>.
  • 或者获取此处所述的在 Linux/vmware 中运行的 SDK 。

黑客快乐!

惠伯特·吉尔

For testing the iPhone, you can get the iPhone SDK here
But you need OS X / Apple computer for it to run the official way.

Not official/hacks:

  • There are ways to get OS X running on standart PC hardware like here.
  • Or get the SDK running in Linux / vmware described here.

Happy Hacking!

Huibert Gill

瘫痪情歌 2024-07-14 14:13:41

大多数智能手机(例如 iPhone 和某些 Android 设备)无法识别 handheld.css。 他们采用了 mediatype="screen",因此您需要包含此 JavaScript 的简短片段

Most smartphones like the iPhone and some Android devices don't recognize the handheld.css. They took the mediatype="screen" so you need to include this short snippet of JavaScript.

尸血腥色 2024-07-14 14:13:40

经过一番寻找,我找到了我正在寻找的东西,感谢领导们。

如果您从“视图”菜单中选择“小屏幕”,Opera 将显示手持设备 css。

With a bit of hunting I found what I was looking for, thanks for the leads guys.

Opera will display the handheld css if you select "Small Screen" from the View menu.

_蜘蛛 2024-07-14 14:13:40

我不确定复活这个老问题是否是一个好主意,但我希望有人找到它:)

有一种简单的方法可以使用 媒体查询

    @media handheld, screen and (max-width: 500px) { /* your css */ }

之后,您可以通过将窗口大小调整为小于 500 像素来在实现媒体查询的浏览器上进行测试。

I'm not sure if it's a good idea to resurrect the old question, but I hope somebody finds it :)

There's a simple way to test handheld css with with media queries:

    @media handheld, screen and (max-width: 500px) { /* your css */ }

After that you can test on browsers that implement media queries by resizing the window to less than 500px.

隔岸观火 2024-07-14 14:13:40

如果您有 Visual Studio,则应该有可让您测试移动 IE 的设备模拟器,或者可以在 Microsoft 网站上独立找到它们。 以下是 WM 5 的一些内容。 有一个 OpenWave 模拟器 可用于测试该浏览器。 还可以使用 Blackberry 模拟器来测试 Blackberry 浏览器。 尽管您无法验证视口元标记,但您可以(某种程度上)使用 Safari 测试 iPhone 支持。 这里有一个 Opera Mini 模拟器

另外,从 HTML 中删除 CSS :)

If you have Visual Studio, there should be device emulators which let you test mobile IE, or they can be found standalone on Microsoft's site. Here are some for WM 5. There is an OpenWave simulator available to test that browser. Blackberry simulators are available as well, to test the Blackberry browser. You can (kind of) test iPhone support with Safari, although you can't verify the viewport meta-tag. There's an Opera Mini simulator here.

Also, get your CSS out of your HTML :)

空城缀染半城烟沙 2024-07-14 14:13:40

我发现在开发环境中切换媒体类型最适合我。

例如,如果您正在测试“手持式”CSS,则只需将媒体类型“屏幕”添加到媒体 atrib 并
注释掉你的默认CSS。

完成此步骤后,您通常需要在真实的手持设备上进行测试。

<!-- <link rel="stylesheet" type="text/css" media="screen" href="screen.css" /> -->
<link rel="stylesheet" type="text/css" media="screen,handheld" href="handheld.css" />

I found out that switching media types in development environment works best for me.

For example if you are testing "handheld" css then just add media type "screen" to media atrib and
comment out your default css.

After this step is complete, you normally would want to test in on real handheld device.

<!-- <link rel="stylesheet" type="text/css" media="screen" href="screen.css" /> -->
<link rel="stylesheet" type="text/css" media="screen,handheld" href="handheld.css" />
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文