【问题标题】:My hyperlink works but the cursor isn't changing to a pointer我的超链接有效,但光标没有变为指针
【发布时间】:2021-12-30 23:47:46
【问题描述】:

我有一个带有嵌入式 .SWF 文件和音频控件的介绍页面(我知道,不推荐使用它们,但客户喜欢这个想法!)。我不使用 Adob​​e Flash 以图形方式(在 Illustrator 中)创建了 .SWF。我能够找到使 .SWF 成为超链接的代码,这很有效,但客户确实希望光标显示手/指针,因此这是进入他们网站的明显超链接。

我尝试过各种CSS,比如:

* {cursor: pointer; }
body {cursor: pointer, auto; }
link {cursor: pointer }
a:hover {cursor: pointer }

但这些似乎都不起作用!鼠标将是页面其余部分的指针,但在您位于 .SWF 对象上方时不会。这是我的 HTML:

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" bgcolor="#000000">

<audio controls autoplay>
<source src="BasketballBeats.ogg" type="audio/ogg">
<source src="BasketballBeats.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>

<object type="application/x-shockwave-flash" width="1440" height="700" onmouseup="document.location='http://www.clientsite.com/welcome'">
<param name="wmode" value="transparent" />
<param name="movie" value="http://www.clientsite.com/TBS-Enter-Site-Intro.swf" />
</object>

</body>

我还使用我测试的第一个 CSS 上传了一个页面示例,因此您可以看到光标在对象上方和下方的变化,但看不到它! http://tentendesignstudio.com/staging/test/intro30 有人能告诉我一种让它工作的方法吗?提前致谢!

【问题讨论】:

  • cursor: pointer; 不是cursor; pointer;
  • 为什么不直接在 SWF 中创建链接?
  • 编辑了我的 OP 以更正我的 CSS 示例代码中的拼写错误。 pablopixel,我在 Adob​​e Illustrator 中使用图层制作了 .SWF 并从那里导出,因为我没有 Flash 或 .FLA 来编辑和创建链接。

标签: html css hyperlink mouse-cursor


【解决方案1】:

有一些语法错误

试试这个

    * {cursor: pointer; }
body {cursor: pointer; }
:link {cursor: pointer; }
a:hover {cursor: pointer; }

【讨论】:

  • 对不起,我编辑了我的 OP 来纠正这个问题,这些是我帖子中的错别字,而不是我尝试的代码。这些都不起作用,无论是单独的还是一起的。 ;-) 我还添加了一个指向示例页面的链接,这样您就可以看到它的行为方式(指针在对象上方和下方,但不是在它上方!)
【解决方案2】:

您始终可以在 Flash 中使用 ActionScript 执行此操作,方法是将您的“进入站点”按钮(或您的 Flash 文件中的任何影片剪辑)设置为:

this.mouseEnabled = true;
this.buttonMode = true;

如果没有看到实际的 AS 代码,我无法为您提供有关如何在您的特定情况下添加此功能的更多具体细节。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-11-11
    • 2011-01-25
    • 2017-12-26
    • 2015-11-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多