Flash链接或对象标签内的锚链接 [英] Flash or object tag inside an anchor link

查看:112
本文介绍了Flash链接或对象标签内的锚链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以插入一个链接到对象标签,点击后你会被重定向到那个链接?



我已经试过了这个:

 < a href =LINK>< OBJECT TAG>< / a> 

甚至是这样:

 < OBJECT TAG height =109>< a href =LINKstyle =margin-top:-109px;>< / a> 

第一个使用Chrome,但在其他网络浏览器中,我无法点击链接。



所以基本上,链接一个对象/ flash对象是真的有可能。



谢谢。

解决方案

我假设在flash对象中添加一个按钮是不可能的,在这种情况下,您可以将锚定在flash对象,使用position:absolute和z-index(可选)。例如: http://jsfiddle.net/qbK5Q/ (我没有使用实际的Flash对象,但它应该与一个工作):

 < div class =objectContainer> 
< object> ...< / object>
< a href =#>测试连结< / a>
< / div>

CSS:

  a {
display:block;
位置:绝对;
宽度:100%;
身高:100%;
z-index:5;
top:0px;
left:0px;
background-color:rgba(255,112,0,0.5);
}
.objectContainer {
position:relative;
width:100px;



$ b

如果它是一个flash对象,请确保它具有wmode参数设置为透明或不透明。这个解决方案的问题在于链接将覆盖flash对象,使得鼠标光标无法访问(flash中的按钮和鼠标事件不会被用户访问)。


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:

<a href="LINK"><OBJECT TAG></a>

and even this:

<OBJECT TAG height="109"><a href="LINK" style="margin-top:-109px;"></a>

The first one is working on Chrome but in the other web browser I can't click the link.

So basically, is it really possible to link an object/flash object.

Thanks.

解决方案

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):

<div class="objectContainer">
    <object>...</object>
    <a href="#">Test link</a>
</div>

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).

这篇关于Flash链接或对象标签内的锚链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆