Flash or object tag inside an anchor link

前端 未结 2 1438
孤城傲影
孤城傲影 2021-01-21 06:58

Is it possible to insert a link to the object tag where after you click it you will be redirected to that link?

I already tried this:



        
2条回答
  •  -上瘾入骨i
    2021-01-21 07:18

    I'm assuming adding a button in the flash object is out of the question, in that case you can position the anchor over the flash object, using "position: absolute" and z-index (optional). Example: http://jsfiddle.net/qbK5Q/ (I haven't used an actual flash object, but it should work with one):

    ... Test link

    CSS:

    a {
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 5;
        top: 0px;
        left: 0px;
        background-color: rgba(255,112,0,0.5);
    }
    .objectContainer {
        position: relative;
        width: 100px;
    }
    

    If it's a flash object, make sure that it has the "wmode" param set to "transparent" or "opaque". The problem with this solution is that the link will cover the flash object making it inaccessible to your mouse cursor (buttons and mouse events inside flash won't be accessible to the user).

提交回复
热议问题