Clicking through a transparent .png

自古美人都是妖i 提交于 2019-11-27 15:39:28

问题


First off, I would like to say that myspace is a pain. But, musicians love it, and I can make some money doing layouts for them. I overlayed a layer of .png's over myspace's original look, but need to utilize the myspace music player. So, I made a picture frame that surrounds the myspace player that has a transparent center so you can see the myspace player. unfortunately, the player doesn't have full functionality. It seems to respond correctly when I hover, but not when I click. does anyone know how to solve this problem?

You can see what I'm talking about here: myspace.com/gprettydesigns


回答1:


add

pointer-events: none;

on your overlay to alow click events to pass through it. It's a fairly recent property so not all browser may understand it.

More informations on pointer-events on https://developer.mozilla.org/en/css/pointer-events




回答2:


The best way would generally be to slice the image up into pieces and place them so that nothing overlays the music player.




回答3:


Maybe you could use z-index to position the image underneath the player, more on this here: http://www.echoecho.com/csslayers.htm




回答4:


Put the background image on a div then use z-index to position it behind the player. The advantage of putting a background image on a div and using z-index is that it'll be faster than using an actual inline image.




回答5:


Clap clap clap to you! I've done sone MySpace tweaking and know it's a real PITA.

Change the CSS here:

#shell {
    visibility:hidden;
    z-index:200;
}

I don't remember if this is feasible or if they only accept inline CSS.

Not really question related but now you can also have bandpages on facebook via RootMusic. MySpace will probably be overrun in no time so I would also give them a look.

Good luck dealing with the spaghetti tables of MySpace.



来源:https://stackoverflow.com/questions/3080746/clicking-through-a-transparent-png

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!