Compatibility issues (currently encountered)

Source: Internet
Author: User

(1) Page loading JS, no need to run the full page code:
<body onload= "JScript: Function name (IE); javascript: function name (Firefox and part); javascript: function name (Google and others); " >
(2) Border Shadow:
-moz-box-shadow:0px 0px 4px Rgba (0,0,0,0.5) (Firefox);
-webkit-box-shadow:0px 0px 4px Rgba (0,0,0,0.5) (Safari or Chrome);
box-shadow:0px 0px 4px Rgba (0,0,0,0.5) (opera or IE9);
(3) Transparency compatible:
---1---background-color:rgba (0,0,0,0.5);/* IE9, Standard browser, IE6, and some IE7 kernel browsers (such as the QQ browser) will read and other browsers */
[email protected] \0screen\,screen\9 {/* only supports IE6, 7, 8 */
. demo{
Background-color: #000000;
opacity=0.5; (Other browsers available, but the text content will also become transparent, which is required to add z-index:999 to the text;)
Filter:alpha (OPACITY=50);
position:static; /* IE6, 7, 8 can only set Position:static (default property), otherwise it will cause child elements to inherit alpha value */
*zoom:1; /* Activate IE6, 7 's Haslayout property, and let it read alpha */
}
. Demo p{
position:relative;/* set child elements as relative positioning, allowing child elements to not inherit alpha values */
}
}
(4) Bending degree of the Edge: border_radius:50%; (Firefox, Google, other, IE9 or above);
(IE6/7/8: If you want to be compatible, you can only use pictures instead);
(5) Reflection effect: need to be under the content of the reflection you want to repeat the content;
-webkit-transform:scaley (-1); /* WebKit kernel Browser implementation, such as Safari */
-moz-transform:scaley (-1); /* Firefox Implementation */
-ms-transform:scaley ( -1);/* IE implementation IE9 above */
-o-transform:scaley ( -1);/* Opera's implementation */
Transform:scaley (-1);
(6) Printing information: Console.log (); (The major browsers except IE9 below, does not contain IE9);
Similar to alert (), but better, because the alert () function blocks the execution of the JavaScript program, causing side effects, while Console.log () prints the information only in the console and therefore does not cause similar concerns. Most browsers now have debugging capabilities, and even without debugging, you can add them by installing plugins. For older browsers (IE6/7/8) that are missing the debug console, the Console object in window does not exist, so using the Console.log () statement directly may cause errors inside the browser (null pointer errors) and eventually cause some old browser crashes. Adding the code below, you can manually define the console object and declare that the log function of the console object is an empty function; (however, in most cases, it is not necessary to do this compatibility work-console.log () and other debugging code should be removed from the final product code)
if (!window.console) {window.console = {log:function () {}};}

Compatibility issues (currently encountered)

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.