增加VBox显存到256M

Virtual Box supports up to 256 MB of video RAM. This can not be set using the slider of the Virtual Box Manager.

To make full use of all supported memory we can issue the following command in a terminal:

Before we change settings such as the video RAM a pre-existing virtual machine has to be shut down.

Note that for 3D video hardware acceleration from the guest addition’s video driver the physical RAM of the host graphics card will be passed through. The video RAM settings of the virtual machine will not affect this.

参考链接


增加VBox显存到256M

判断网页是通过PC端还是移动终端打开的

通过判断打开设备,跳转不同页面,可以根据 User-Agent 来区分

也可以执行其他操作:

JS判断客户端是否是iOS或者Android手机移动端:

通过判断浏览器的 userAgent,用正则来判断手机是否是ios和Android客户端。代码如下:

下面一个比较全面的浏览器检查函数,提供更多的检查内容,你可以检查是否是移动端(Mobile)、ipad、iphone、微信、QQ等。

第一种:

 

检测浏览器语言

第二种:

也可以通过这样来适配,然后直接转跳到移动端页面:

参考链接


判断网页是通过PC端还是移动终端打开的