Ubuntu 上的 CSS 跨浏览器兼容性

标签 css ubuntu cross-browser

我目前从事 Web 开发工作,我的默认桌面是 Ubuntu,我对自己的设置和应用程序很满意。但是我需要测试网页的跨浏览器兼容性,同时仍然在 Ubuntu 上。 为了让 IE7 或 IE8(带 wine)在 ubuntu 上运行,我经历了 hell 般的考验,当它们最终工作时,它们出现了很多错误,图形/滚动速度非常慢。 当然可以选择虚拟框,但同样,对于运行一个小应用程序来说,GBytes 太多了!

所以对于所有的 CSS 专家,我如何才能继续使用我心爱的 Ubuntu 并仍然提供高质量(经过测试)的页面。

谢谢。

最佳答案

编辑:

新鲜度更新: 我现在使用 browserstack.com 的付费服务通过 Flash 隧道提供多种不同的浏览器测试环境。我是付费用户,但有一个初始免费试用期。 browserstack 让我不再需要以任何形式、虚拟镜像或其他方式在我的机器上运行 Windows 操作系统。因为它也允许隧道,我可以在我的本地机器上托管网站,但仍然在 browserstack 浏览器中测试。我认为每月的费用非常花得值。

结束编辑

我尝试过各种选择,包括“最终解决方案”:从微软免费下载的 Windows 测试操作系统

我已经尝试了下面的一些选项,但 virtualbox 可能是您进行完整和完整测试的最佳选择,尤其是因为在专业能力下您经常需要测试 ie8、ie7 和 ie6。仅安装一个操作系统会变得棘手。因此,按照从最简单和最浅层测试到最复杂和最全面测试的顺序:

浏览器实验室.adobe.com

  • 一个更新、有趣的在线解决方案是:browserlab.adobe.com .与浏览器截图相比,它实际上非常具体且快速。它只为您提供屏幕截图,但这是伟大的第一步。因此,我确实建议将其用于纯视觉(因此相对较浅)的测试。

浏览器网站

  • 同时 browsershots.org也是您应该用于用户可能看到的概览体验的东西,如果没有真正的浏览器进行 javascript 和行为测试(而不是仅仅显示和渲染测试 browsershots提供)。看到图像之前的延迟也是致命的。

双启动进入windows

  • 我尝试过的另一个方法是双启动,我 99% 的时间都在 ubuntu 上工作,我安装了 Windows 并且可以双启动。这不是一种快速的测试方法,但如果您没有任何其他访问方式,ie,它应该至少适用于最新版本。

远程桌面连接到正在运行的 Windows 框

  • 在我提到“涵盖所有基础”选项之前,另一种有用的可能性是设置一台 Windows 机器并启动它并通过远程桌面连接到它,这样您就可以在一台机器上工作并在另一台机器上进行测试两者。

最终的解决方案,使用virtualbox

  • 最后,所有解决方案之母,使用 virtualbox:

幸运的是(我知道你说过你不喜欢 virtualbox 解决方案,而且我知道这是一个烦人的设置过程,但是......)微软提供了不同版本的可用一年或更长时间的虚拟机发行版即预装,无需许可证即可使用一年左右,然后您必须更新虚拟机,@ http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en

从微软免费提供的浏览器测试图像安装虚拟机

因为本 ubuntu 设置指南不再在其他任何地方提供,以防万一您或其他人确实需要它,我觉得有必要包括在 ubuntu 论坛上向我建议的安装过程的实际细节并在我通过它们时工作。我为他们的长度道歉。由 ubuntu 论坛上现在匿名的原始发帖人提供:

免费访问 Microsoft 浏览器兼容性虚拟操作系统,Ubuntu 安装步骤

http://ubuntuforums.org/showthread.php?t=1097080 (Ed: I can't find this thread online any more)

HOWTO: run IE6, IE7, IE8 on Linux in VirtualBox You need: virtualbox, qemu, wine

Code: apt-get install virtualbox qemu wine

Download the free(!) Microsoft Internet Explorer Application Compatibility Check VPC Images here: http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en (Note: you don't have to download the full pack, you can cherry pick specific combinations of XP/Vista and IE6-8)

Extract the VPC image(s) with wine (double-click). (Note: it might take a while before the first window shows up)

Turn the VPC image(s) into (a) VMWare image(s) (which is/are readable by VirtualBox): qemu-img convert -f vpc image.vhd -O vmdk image.vmdk

Setup a new VM in VirtualBox, using the vmdk image as an existing disk. Boot it, you will see the Windows boot progress bar and ... it will BSOD shortly after.

Fixing the BSOD:

The BSOD is caused because the virtual Windows tries to load processor drivers for the wrong processor (it is not running on VirtualPC proc, but on VirtualBox proc). Or something like that... We need to force Windows not to attempt to load drivers for the processor (it doesn't need any proc drivers, because it's all virtual anyway). Start safe mode by (frantically) hitting F8 at Windows boot and choosing safe mode.

Ignore all the 'New hardware' detected warnings (we will deal with those later). Start a command box and run the following command to disable the loading of processor drivers:

Code: sc config processor start= disabled (note the space between '=' and 'disabled'!)

Restart the virtual Windows, it should now boot all the way to the Windows Desktop.

Now just when you think you can start browsing the web with IE, you will find out that the virtual Windows needs to install the drivers for the AMD PCnet NIC, which are located on the Windows install disk. Fortunately for those without a Windows install disk, there is another way :)

Download AMD PCnet drivers here: http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_6629_2452%5E2454%5E2486,00.html

Make an iso file containing the drivers. I used Brasero for simplicity. Choose to create a Data Project, add the zip file (or the unzipped files, saves you a step in Windows), create the iso. No need to burn an actual cd!

Stop the virtual Windows, edit the settings in VirtualBox: mount your brand new iso.

Start the virtual Windows, when it asks to install the drivers for the PCnet nick, point it to the (unzipped) drivers. Et voila! You have teh innernets! (Now you can also try to install the other drivers it complains for, but it's not really necessary)

图像自述文件说图像将在大约一年后过期。根据我的经验,该系统在使用多小时时会遇到问题,但在您启动以测试网站时可能需要的短时间内仍然可用。在最坏的情况下,您可能不得不再次执行这些步骤,因此请务必将它们放在一年左右后您可以再次找到它们的地方。

关于Ubuntu 上的 CSS 跨浏览器兼容性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2789901/

相关文章:

javascript - 跨浏览器 HTML5 拖放 JSON 数据传输失败

testing - 如果 Chrome 和 Safari 都基于 WebKit,是否意味着我不必同时测试这两种浏览器?

javascript - 按下按键时禁用 Nintendo 3DS 滚动功能

javascript - Ng Bootstrap 轮播全屏

linux - 拉动带有引导/重新启动过程的线路以及带有 IP 地址的线路

Python 3.6 脚本在 Windows 10 上出奇地慢,但在 Ubuntu 17.10 上则不然

Ubuntu 无法停止 mysqld

html - OSX 字体宽度与标准跨平台字体的窗口不同

javascript - 悬停时具有边框半径和不透明度的图像

javascript - 根据附加到图像的计时器更改的 URL