Chrome:自动移动网页元素 [英] Chrome: Automatic shift of web elements

查看:192
本文介绍了Chrome:自动移动网页元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个网络项目。在过去两个星期,我正在进行我的学期考试,所以我想休息一下。现在,因为他们结束了,我恢复了我的工作;但我发现我的一些网络元素(如按钮,跨度)已在Chrome(而不是IE和Mozilla)上移动了一些像素。这可能是什么原因?如何解决这个问题?



原始程式码 http://jsfiddle.net/p22L15vs/15/embedded/result/



左边距 按钮 )原先为:

  -webkit- start:620px; 

现在,相同的代码会导致按钮输入新行。



span 的另一个例子:



ORIGINAL CODE http://jsfiddle.net/vbpasx1j/



小提琴中显示的文本放在span标签中。两周前,它只需要两行。

解决方案

这是因为Chrome 37的标题改变,引入了DirectWrite对Windows的支持。
查看此链接了解更多详情:



http://www.omgchrome.com/google-chrome-37-arrives-improved-font-rendering-windows/



此功能对各种开发人员造成类似问题。



为了恢复到以前的字体,解决方案是禁用新功能。您需要按照以下步骤操作:






1>在地址栏中输入chrome:// flags / p>

2>在禁用DirectWrite Windows部分中,单击启用(实际上禁用它)。



3>现在在底部。



4>重新启动浏览器。






您的原始页面设计保持不变。 :)


I'm working on a web project. In the last two weeks I was having my semester examinations so I'd to take a break from it. Now, since they are over, I've resumed my work; but I find that some of my web elements (like button,span) have shifted by some pixels on Chrome (not on IE and Mozilla). What could be the reason behind this? How do I overcome this problem?

ORIGINAL CODE: http://jsfiddle.net/p22L15vs/15/embedded/result/

The left margin (for button) for chrome was originally:

-webkit-margin-start:620px;

Now the same code causes the button to enter a new line.

Another example of span:

ORIGINAL CODE: http://jsfiddle.net/vbpasx1j/

The text shown in the fiddle was placed in a span tag. Two weeks ago it required only two lines. Now it requires three lines.

解决方案

This is to due the headline change in Chrome 37 ,the introduction of DirectWrite support for Windows. Check this link for further details:

http://www.omgchrome.com/google-chrome-37-arrives-improved-font-rendering-windows/

This feature has caused a similar issue for various developers.

In order to restore to your previous font, the solution is to disable this new feature in your browser. You need to follow the following steps:


1> Enter chrome://flags/ in your address bar.

2> In the Disable DirectWrite Windows section click on Enable (actually disables it).

3> Click on Relaunch Now at the bottom.

4> Restart your browser.


Your original page design remains unchanged. :)

这篇关于Chrome:自动移动网页元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆