shadow.style.filter = ’
progid:DXImageTransform.Microsoft.Alpha(Opacity=75)
progid:DXImageTransform.Microsoft.Blur(pixelRadius=’shadow.userAttrs.radius’,makeShadow=false,shadowOpacity=100)
’;
var clone = element.cloneNode(true);
clone.position_offset = {
’y’: (0 - vml_parent.pos_ieCSS3.y),
’x’: (0 - vml_parent.pos_ieCSS3.x)
};
clone.size_offset = {
’width’: 0,
’height’: 0
};
clone.style.behavior = null;
clone.style.position = ’absolute’;
clone.style.top = (element.pos_ieCSS3.yclone.position_offset.y)’px’;
clone.style.left = (element.pos_ieCSS3.xclone.position_offset.x)’px’;
clone.className = ’ieCSS3_text_shadow’;
element.parentNode.appendChild(shadow);
element.parentNode.appendChild(clone);
element.style.visibility = ’hidden’;
// For window resizing
element.vml.push(clone);
element.vml.push(shadow);
return(true);
}
function ondocumentready(classID) {
if (!supportsVml()) { return(false); }
if (this.className.match(classID)) { return(false); }
this.className = this.className.concat(’ ’, classID);
// Add a namespace for VML (IE8 requires it)
if (!document.namespaces.v) { document.namespaces.add("v", "urn:schemas-microsoft-com:vml"); }
// Check to see if we’ve run once before on this page
if (typeof(window.ieCSS3) == ’undefined’) {
// Create global ieCSS3 object
window.ieCSS3 = {
’vmlified_elements’: new Array(),
’update_timer’: setInterval(updatePositionAndSize, timer_length)
};
if (typeof(window.onresize) == ’function’) { window.ieCSS3.previous_onresize = window.onresize; }
// Attach window resize event
window.onresize = updatePositionAndSize;
}
// These attrs are for the script and have no meaning to the browser:
this.borderRadius = parseInt(this.currentStyle[’iecss3-border-radius’] ||
this.currentStyle[’-moz-border-radius’] ||
this.currentStyle[’-webkit-border-radius’] ||
this.currentStyle[’border-radius’] ||
this.currentStyle[’-khtml-border-radius’]);
this.arcSize = Math.min(this.borderRadius / Math.min(this.offsetWidth, this.offsetHeight), 1);
this.fillColor = this.currentStyle.backgroundColor;
this.fillSrc = https://www.rkxy.com.cn/dnjc/this.currentStyle.backgroundImage.replace(/^url("(. )")$/, ’$1’);
this.strokeColor = this.currentStyle.borderColor;
this.strokeWeight = parseInt(this.currentStyle.borderWidth);
this.stroked = ’true’;
if (isNaN(this.strokeWeight) || (this.strokeWeight == 0)) {
this.strokeWeight = 0;
this.strokeColor = fillColor;
this.stroked = ’false’;
}
this.opacity = parseFloat(this.currentStyle.opacity || 1);
this.textShadow = this.currentStyle[’text-shadow’];
this.element.vml = new Array();
this.zIndex = parseInt(this.currentStyle.zIndex);
if (isNaN(this.zIndex)) { this.zIndex = 0; }
// Find which element provides position:relative for the target element (default to BODY)
vml_parent = this;
var limit = 100, i = 0;
do {
vml_parent = vml_parent.parentElement;
i;
if (i = limit) { return(false); }
} while ((typeof(vml_parent) != ’undefined’)(vml_parent.currentStyle.position != ’relative’)(vml_parent.tagName != ’BODY’));
vml_parent.pos_ieCSS3 = findPos(vml_parent);
this.pos_ieCSS3 = findPos(this);
var rv1 = createBoxShadow(this, vml_parent);
var rv2 = createBorderRect(this, vml_parent);
var rv3 = createTextShadow(this, vml_parent);
if (rv1 || rv2 || rv3) { window.ieCSS3.vmlified_elements.push(this.element); }
if (typeof(vml_parent.document.ieCSS3_stylesheet) == ’undefined’) {
vml_parent.document.ieCSS3_stylesheet = vml_parent.document.createStyleSheet();
vml_parent.document.ieCSS3_stylesheet.addRule("v:roundrect", "behavior: url(#default#VML)");
vml_parent.document.ieCSS3_stylesheet.addRule("v:fill", "behavior: url(#default#VML)");
// Compatibility with IE7.js
推荐阅读
- Mac注意事项模板1
- 腾讯地图APP删除已经下载离线地图的方法步骤
- Mac注意事项模板2
- Mac注意事项模板3
- 修改隐藏L7下方的横条
- ie-css3.htc 让IE6, 7, and 8也支持box-shadow
- IE6、IE7、IE8浏览器下的CSS、JS兼容性对比
- 汽车一键启动要按几下
- 针对IE8正式版的CSS hack
- 部分 IE Firefox在css中的差别