1)我试图在嵌入的对象上放置透明图像.我在某个地方缺少相对和绝对的职位.但是哪里?
我实际上放置透明图像,因为我不能使用cursor:指针嵌入对象.所以我的想法是放置一个透明的图像并使用cursor:pointer.
2)为什么没有onclick在IE中工作?它在Firefox和Chrome中运行良好.
<div id="divmarquee" runat="server" > <img id="imgtrans" runat="server" src= "/images/480x75-blank-transparent" title="Click Here" style="position:relative" /> <object width="475px" height="75px" onclick="window.location='http://www.google.com'; return false;"> <embed src="merchant_images/The_Marquee_Dealn.swf" type="application/x-shockwave-flash" style="z-index: 0; cursor:pointer" wmode="transparent" width="475px" height="75px"> </embed> </object> </div>
提前致谢!
解决方法
使用给定的代码,将位置值添加到#divmarquee上的position:relative,并将position更改为position:absolute并在#imgtrans上添加cursor:pointer:
#divmarquee { position: relative; } #imgtrans { position: absolute; cursor: pointer; }
见:http://jsfiddle.net/blineberry/pJZ2t/