- Bootstrap 4:Responsive Web Design
- Silvio Moreto Matt Lambert Benjamin Jakobus Jason Marah
- 391字
- 2021-07-09 18:54:43
How to debug different viewports at the browser
Let's see how to debug different viewports using the Google Chrome web browser. Even if you already know that you can skip this section, it is important to refresh the steps for doing that.
First of all, open the current landing page project that we will continue working with in this chapter in the Google Chrome browser. In the page, you need to select the Developer tools option. There are many ways to open this menu:
- Right-click at any place on the page and click on the last option Element inspector
- Go to the setting (the sandwich button at the top-right of the address bar), click on More tools, and select Developer tools
- The shortcut to open it is Ctrl + Shift + I (cmd for OS X users)
- F12 in Windows also works (this is an Internet Explorer legacy)
In the Developer tools, click in the mobile phone on the left of a magnifier, as shown in the following screenshot:

It will change the display of the viewport to a certain device and you can also set a specific network usage to limit the data bandwidth. Chrome will show a message telling you that for properly visualization you may need to reload the page to get the correct rendering.

As shown in the next screenshot, we have activated the Device mode for an iPhone 5 device. When we set this viewport, problems started appearing because we did not make the landing page with mobile-first methodology.

The first problem is in the second row of our layout. See how Ctrl + D breaks to a new line. That is not supposed to happen.
Another problem is that we have a horizontal scroll for this device due to some unknown reason. That sucks! We will have more work than with the opposite direction that starts with the mobile page. Keep it as a lesson for not repeating the same mistake.
Now, we can debug our website in different devices with different resolutions. You may see that the mouse cursor has changed to a gray circle. Also, the click actions have changed to tap actions. With that, you can fully test the website without the physical device.
Let's first clean out the messy parts in the layout before playing some tricks with the mobile version.
- Ray分布式機器學(xué)習(xí):利用Ray進行大模型的數(shù)據(jù)處理、訓(xùn)練、推理和部署
- INSTANT OpenNMS Starter
- Big Data Analytics
- 精通網(wǎng)絡(luò)視頻核心開發(fā)技術(shù)
- 軟件項目管理實用教程
- 用Python實現(xiàn)深度學(xué)習(xí)框架
- 自制編程語言
- Keras深度學(xué)習(xí)實戰(zhàn)
- Multithreading in C# 5.0 Cookbook
- 利用Python進行數(shù)據(jù)分析
- Raspberry Pi Robotic Projects(Third Edition)
- Android移動應(yīng)用開發(fā)項目教程
- Python機器學(xué)習(xí)開發(fā)實戰(zhàn)
- Python深度學(xué)習(xí)(第2版)
- Google Maps JavaScript API Cookbook