English 中文(简体)
Raphaeljs在IE中将所有文本渲染为斜体
原标题:Raphaeljs renders all text as Italic in IE

我正在使用RaphaelJS,用于直观地表示一些数据。底层技术是SVG,所以很明显,IE中的东西并不总是那么好用,但该库在呈现有用的东西方面做得相对不错,尽管它通常看起来很差。

无论如何,我似乎无法回避这个基本问题。文本在Chrome或FireFox中渲染良好,但在IE8中所有内容都渲染为粗体和斜体。

要查看我的问题,请转到RaphaelJS游乐场并使用以下代码

paper.text(100, 100, "this is the text")

以下是Chrome和IE的结果。

Chrome IE8

对此有什么变通办法吗?

问题回答

您是否尝试过.attr({“font-family”:“xxxxxx”,“font-weight”:400})

只适用于所有找到此页面并有相同问题的人。解决方案是使用的doctype。您应该(至少从GWT2.x开始)使用<;!DOCTYPE html>如果这样做,则Internet Explorer会渲染。。。。





相关问题
Image rendered with wrong colors in IE8

I have a gradient image as a PNG (no transparency) in a web-page. By taking a screenshot of Chrome showing the page and cropping the image from the page, I see the exact same colors are drawn as the ...

Determine Mobile Internet Explorer version

I need to determine the version of Mobile Internet Explorer on a Windows Mobile 6.1 device. So that I can report the same user-agent string as is being used by Mobile Internet Explorer. The user-...

CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

Internet Explorer only part loading JavaScript/CSS

I m having trouble with my local development environment where IE (6 through to 8) is only part loading JavaScript/CSS files. It throws random errors at random places in jquery.min.js every time I ...

IE doesn t run Javascript when you click back button

I ve built a shop with tons of JS running. One of the pieces of the cart, is a zip code field which is required to calculate shipping cost. This works fine going through the cart. Now clicking ...