How to test a website for Retina on Windows without an actual Retina display?

前端 未结 9 1396
Happy的楠姐
Happy的楠姐 2020-12-04 05:49

Is there a way to simulate a Retina display on Windows to test a website for HiDPI displays such as Retina?

I run Windows on a standard 24\" 1920x1080 monitor. Last

相关标签:
9条回答
  • 2020-12-04 06:02

    I do not know if this is too simple, I press ctrl and scroll and it triggers the media query. I have checked it in bugzilla and it works. I am not sure about the svg scaling as it appears blurry,but it is the svg image.

    0 讨论(0)
  • 2020-12-04 06:03

    I use an image resizing library to dynamically create images. For the 2x version I add a dynamic watermark during debugging - this makes it very easy to see if the high-res image is actually being shown or not. Have found it very helpful.

    The way this works will vary so not including sample code.

    0 讨论(0)
  • 2020-12-04 06:07

    In chrome you can do it by:

    1) Open up Chrome Developer Tools and click on the little "gear" icon. enter image description here


    2) Then choose "Show 'Emulation' view in console drawer." enter image description here


    3) Finally, open up the "console drawer" in Developer Tools, and choose Emulation. Set Emulate screen and set the Device Pixel Ratio to 2.5.

    enter image description here

    0 讨论(0)
  • 2020-12-04 06:11

    Google Chrome Version 80

    1. Open the Developer Tools ctrl-shift j
    2. Toggle the device toolbar by clicking on the tablet/phone icon at the top left(it will turn blue if you click it)

    1. Now the viewport should have a toolbar above it. Click the options icon(3 dots) at the top right and select the Add device pixel ratio option.

    1. You should now see the option on the toolbar. From here you can switch to 1x, 2x, or 3x.

    1. When you are testing make sure that you hit the refresh button each time you change the pixel ratio. If you set the ratio to 2x and then set it back to lower then you won't see any changes because the browser will not fetch 1x assets if it has already fetch 2x or higher.
    0 讨论(0)
  • 2020-12-04 06:12

    In Google Chrome version "33.0.1720.0 Canary", you can now emulate devices like iPhone5 and others with a great set of parameters like "Device pixel ratio", "android font metrics" and "Viewport emulation".

    There's no need for that Firefox hack anymore - hard to work with, anyway.

    Thanks Google dev team! !:)

    0 讨论(0)
  • 2020-12-04 06:14

    As far as I can tell, it's not possible other than buying a retina device.

    Some Workarounds

    • Suggested here:

      • If you doubled up the image sizes and proportions are still the same, you’re pretty much safe. If you don’t have a retina display to test with, switch from the pixel-ratio media query to something width-based.

      • Testing and Troubleshooting High-Resolution Content
        http://developer.apple.com/library/mac/#documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Testing/Testing.html

    • How to Develop for HiDPI (“Retina”) without a Retina MacBook Pro
      http://make.wordpress.org/ui/2012/08/01/dev-for-hidpi-without-retina-mbp/

    • WordPress Retina Images
      http://wpmu.org/wordpress-retina/

    Less Relevant

    • How to Create a Responsive, Retina-ready Website

    • How to Design for Apple’s Retina Displays
      http://www.studiopress.com/design/retina-display-design.htm

    • Building Websites for Retina Displays: Making Friends with Pixels
      http://www.slideshare.net/shoshizilla/building-websites-for-retina-displays-making-friends-with-pixels

    • How to develop a website for retina display?

    • how to get retina-ready?

    0 讨论(0)
提交回复
热议问题