html - 如何正确地将 flash 对象插入模态 HTML 对话框

标签 html css flash modal-dialog

我有一个使用模式的页面,在单击链接时显示。它适用于文本,但我想不出一种方法来使其与冲击波对象一起正常工作。当嵌入到代码中时,flash 元素会一直显示,而不是仅在单击模式时显示。我应该怎么做才能让闪光灯一开始是隐藏的,只显示在点击链接后显示的模态窗口中?

这是 HTML 摘录:

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>MODAL</title>
    <meta name="description" content="responsive layout demos">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" media="screen" href="css/left-fluid.css">

     <!--[if lt IE 9]>
        <script src="js/html5shiv.min.js"></script>
      <script src="js/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript" src="js/jquery.min.js"></script>
  </head>

  <body>
    <header></header>

    <div class="columns-container">

        <div class="left-column">

        <div id="modal-window">
            <a href="#openModal" class="botao"><h3 class="botao"><i class="fa fa-plus-circle" aria-hidden="true"></i>&nbsp; click here to see the modal with flash</h3></a>
        </div>

           <div id="openModal" class="modalDialog">
              <div> 
                 <a href="#close" title="Close" class="close">X</a>
                 <P>THIS IS SHOWN IN THE MODAL</P>
                 <!--THIS IS NOT -> --><embed width="500" height="300" src="flash/stuff.swf"> 
              </div>
        </div>
  </body>
</html>

这是 CSS:

.modalDialog {
    position: fixed;
    font-family: Arial, Helvetica, sans-serif;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    opacity:0;
    -webkit-transition: opacity 400ms ease-in;
    -moz-transition: opacity 400ms ease-in;
    transition: opacity 400ms ease-in;
    pointer-events: none;
    }

.modalDialog:target {
    opacity:1;
    pointer-events: auto;
    }

.modalDialog > div {
    width: 600px;
    position: relative;
    margin: 3% auto;
    padding: 5px 20px 13px 20px;
    border-radius: 10px;
    background: #eee;
    }

.close {
    background: #606061;
    color: #FFFFFF;
    line-height: 25px;
    position: absolute;
    right: -12px;
    text-align: center;
    top: -10px;
    width: 24px;
    text-decoration: none;
    font-weight: bold;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    border-radius: 12px;
    }

.close:hover {
    background: #00d9ff;
    }

最佳答案

<embed width="500" height="300" src="flash/stuff.swf">代码在 >:

之前的末尾添加

type="application/x-shockwave-flash"
       pluginspage="http://www.macromedia.com/go/getflashplayer"

你有 2 个未关闭 <div>标签,添加 </div>在每一个下 <div class="columns-container"><div class="left-column">

关于html - 如何正确地将 flash 对象插入模态 HTML 对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41349421/

相关文章:

javascript面向对象的函数内调用函数或var内调用函数

javascript - 通过在它们周围徒手绘制来选择 SVG 元素

html - 在 html/css 中的并发背景颜色中开始新的背景颜色

javascript - 使用 jquery 检测物化框架侧导航宽度

一个项目中的 Java 和 Flash : How to organize it in Eclipse and Git?

flash - Flash 中的多种字体/语言支持

html - 寻找平行四边形的中间

html - 如何仅使用 css 将 div 与外部 div 顶部的偏移量设置为与外部 div 侧面的偏移量相同?

javascript - 如何在网络语言中以不规则多边形缩放图像。?

javascript - SetVariable 在 FireFox 中有效,但在 Internet Explorer 中无效?