Introduction to image in the Raphael library in IE8, chrome, Firefox, and opera

Source: Internet
Author: User

First, Firefox and opera are fully supported. For details, refer to idea.
Its
Since the rendering engine of Each browser is different, the support for Javascript is also different. Previous <
Href = "http://blog.csdn.net/Vanessa219/archive/2009/04/27/4130250.aspx "&
GT; version </a> in IE
And chrome. So a few days ago I want to submit a description by the Raphael team, and the Raphael website is not normal in IE6, and its demo is also running.
. After talking about so many bad things, I just suggested that I had uninstalled IE 6 yesterday and changed it to an IE
8. Hey, I don't need IE. I'm very happy to use Firefox. I feel that the Raphael library is still very powerful. It should be nice to look into depth.
Today, Raphael 0.7.4 was released with a low profile and made changes to the image. Later, I modified it so that it can be run in IE8, chrome, Firefox, and opera mainstream browsers.

To sum up:

1. Chrome does not support
Renrurn function (){}
For example:
Loadimg. onload = function (image ){
Return function () {// function} (image );
}
To rewrite
Loadimg. onload = function (image ){
{// Function} (image );
}
2. In Chrome, global variables cannot be used in other subfunctions, and local variables cannot be used in other functions.
For example:
VaR image_width = $ ("# rimg"). Width ();
In
$ ("# OK"). Click (function (){
If (pic_select = "actual size "){
Loadimg. onload = function (image ){
Image. ATTR ({
SRC: source,
Width: $ ("# rimg"). Width (), // It does not work when image_width is used.
Height: $ ("# rimg"). Height ()
});
} (Image );
}
}

3. Use in IE
Image. ATTR ({
SRC: source,
Width: $ ("# selectarea"). Width (), // image_width is useless.
Height: $ ("# selectarea"). Height ()
});
The displayed width and height values are correct.
However, the interface is distorted, and you need to pay attention to this problem after the graduation thesis is written.
In CSS, Firefox and IE are different in parsing. I don't know if it is because of this problem.
For differences between ALT, see
Http://blog.csdn.net/Vanessa219/archive/2008/03/14/2181013.aspx
Other details ....
... See
...... (I will announce it later. I will submit my papers tomorrow ....)

For the implementation of the previous version, see
Http://blog.csdn.net/Vanessa219/archive/2009/04/27/4130250.aspx (only available in Firefox and opera)
See
Http://blog.csdn.net/Vanessa219/archive/2009/04/30/4140449.aspx

PS: 1. logon and logout are troublesome for users who use multiple browsers. They need to log on each time a browser is opened. I would like to ask how to solve this problem.
In addition, there are many similar problems, such as rollback, saving, and synchronization... When I was a child, I always blamed my predecessors for not unifying the world.
2. Chrome and Firefox do not support QQ space very well.
3. In IE, whether to block the script prompt will pop up by default, which will make the user panic and have a very bad user experience.
4. When connecting to the pop-up page in IE, it does not pop up in the same window and becomes a new tab in the window. Instead, it will pop up again, which is very troublesome to use.
5. the labels on the IE blogger logon interface are all crowded together. Ugly.
6. No, but the "Developer Tools" are good. It is worth mentioning that it is especially convenient for JavaScript debugging.
7. When the jpgimage in Chrome is not displayed in the original size, the image quality is lower than that in IE and Firefox.
8. Javascript beginners may be wrong. Many of them may be coincidental and hope to give some advice. There are a lot of differences. I hope people can share their specific information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.