Webkit(钛桌面内)缩小字体
这个问题出现在每一位文本上,无论是表格、div 还是其他内容,
正如您在文本元素的每个右侧看到的那样,缺少 1-2 个像素。添加填充永远不会有
任何建议,请?
This problem appears on every bit of text, no matter if it is table,div or something else
As you can see on every right side of text elements, 1-2 pixels is missing. Adding of padding never helps
Any suggestions please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
您可以尝试以下针对 webkit 浏览器的修复。
将按钮范围替换为您的文本类。
@media screen and (-webkit-min-device-pixel-ratio:0) { /* Safari and
仅限 Google Chrome - 修复边距 */ 你的类名 { margin-top: –1px;
} }
You could try to following fix for webkit browsers.
Replace the button span with your text class..
@media screen and (-webkit-min-device-pixel-ratio:0) { /* Safari and
Google Chrome only - fix margins */ your classname { margin-top: –1px;
} }
您是否设置了视口元标记来指定其宽度和缩放比例?也许这会有帮助?它记录在 Apple 开发文档
Have you set the viewport meta tag to specify its width and zoom scale? Maybe that would help? It's documented in the Apple dev docs
您可以尝试使用-webkit-font-size-adjust。
在这里查看更多信息:
http:// webdesignernotebook.com/css/the-little-known-font-size-adjust-css3-property/
You could try using -webkit-font-size-adjust.
Look here for more info on it:
http://webdesignernotebook.com/css/the-little-known-font-size-adjust-css3-property/
发生这种情况的原因可能是
继承的CSS属性
如果CSS似乎没有修复它,请检查html 文档类型。尽管在极少数情况下,某些标签不适用于某些文档类型。
在 CSS 中使用 !important 属性来强制应用某个规则,该规则会丢弃所有其他规则。
This is happening probably because of
Inherited CSS property
If CSS does not seem to fixed it, check html doctype. Some tags although in rare cases do not work with certain doc types.
use !important attribute in CSS to enforce a certain rule be applied which discards all others.
尝试将
display: inline-block
和负text-indent
设置为元素(嵌入仅限 webkit 的媒体查询中) )
try to set
display: inline-block
and a negativetext-indent
to<span>
elements (embedded inside a webkit-only media query)我已经尝试解决这个问题一个月了。这是我尝试过并发现的。但我无法得到实际的解决方案;
我已经跟进了这个线程,不幸的是没有任何效果。
尝试了几个简单的 html 文档与最可能的文档类型、css、字体大小、字体样式重置..等,但没有成功。
我发现;当与远程 url 一起使用时,似乎工作正常,渲染也正常。当使用嵌入的html页面时,导致了这个问题。
在钛金发行列表中;我发现,它们代表了一个 Webkit bug。
https://jira.appcelerator.org/browse/TIDESK-136
解决方案可能正在升级webkit 版本,但 Titanium 比 webkit 有很多功能。所以升级并不是一件容易的事。
I have tried to deal with this problem for a month. Here what I have tried and found out. But I could not get actual solution;
I have followed up this thread, unfortunately nothing worked.
Tried several simple html documents with most possible doctypes,css,font-size,font-styles reset ..etc did not worked.
I discovered; when using with a remote url, it seems work fine, rendering is ok. When using embedded html pages, causing the problem.
In Titanium issue list; I have found out that, they represented as a Webkit bug.
https://jira.appcelerator.org/browse/TIDESK-136
Solution might be upgrading webkit version but Titanium has a lot functionality over webkit. So upgrading would not be an easy task.
我在Windows中的TideSDK中解决这个问题的方法是对有问题的字体执行以下操作:
也许不是您的应用程序的最佳解决方案,(也许您不想向字体添加任何空格或粗细,因为看起来您可能有更大的数据表要显示),但我的客户可以接受。
My solution to this problem in TideSDK in windows was to do the following on the font in question:
Maybe not the best solution for your application, (maybe you don't want to add any space or weight to the font since it seems you may have a much larger table of data to display) , but acceptable by my client.