Below is my code.
When opening the page in the browser, select the text in the div, the text will be displayed by some shadow quad free. If you delete a line z-index: 0, the CSS class will perform in test1, i.e. correctly.
In my project, the z-index should be set to more than zero, so I can not remove the line.
I got a solution bg_img.filter = "" When the pannel.z-pointer is greater than 0, that would also work better. But unfortunately, bg_img.filter.alpha should also be set, too.
How can I do that?
& lt ;! DOCTYPE html public "- // W3C / / DTD HTML 4.01 transcription // n" "http: // www .w3.org / TR / HTML4 / loose.dtd" & gt; & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Script language = "javascript" src = "script / im_test.js" & gt; & Lt; / Script & gt; & Lt; Title & gt; Trial & lt; / Title & gt; & Lt; Style type = "text / css" & gt; .test1 {status: absolute; Background: #ffffff; Left: 20px; Top: 20px; Border: 1 px solid; Width: 198px; Height: 500px; Filters: Przid: DXImageTransform.Microsoft.Shadow (color = "# 999999", direction = 135, power = 5); Z-index: 0; } & Lt; / Style & gt; & Lt; Script & gt; Function init () {var pannel = document.createElement ('div'); Var bg_img = document.createElement ('div'); Var head = document.createElement ('div'); Pannel.setAttribute ('class', 'test1'); Pannel.setAttribute ('classname', 'test1'); Bg_img.style.cssText = "Position: Relative; Left: 0px; Top: 0px;" + "Width: 190px;" + "Height: 500 pixels;" + "Filter: Alpha (Opacity = 100);"; Head.style.cssText = "Status: Absolute;" + "Left: 0 pixels;" + "Top: 0 pixels;" + "Width: 180 pixels;" + "Height: 20px;"; Document.body.appendChild (pannel); Pannel.appendChild (bg_img); Pannel.appendChild (head); Head.innerHTML = "& lt; div> yusutechasdf Internal HTML } & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body onload = "init ()" & gt; & Lt; / Body & gt; & Lt; / Html & gt;
In IE z-index: 0;
Try setting it on one and adjusting the other z-index accordingly.
Comments
Post a Comment