Shadowbox不显示任何内容

时间:2014-03-12 13:49:05

标签: javascript shadowbox

我想在页面加载时在shadowbox中显示一个简单的html片段。出现阴影,但内容不可见。我已经尝试了内联html,一个单独的html文件和一个内容div,没有任何作用。你如何让shadowbox显示一条HTML消息?

我有/ shadowbox /目录中的所有shadowbox文件。

<html><head>
<title>test</title>
<link rel="stylesheet" type="text/css" href="shadowbox/shadowbox.css">
<script type="text/javascript" src="shadowbox/shadowbox.js"></script>
<script type="text/javascript">
    Shadowbox.init({
        // let's skip the automatic setup because we don't have any
        // properly configured link elements on the page
        //skipSetup: true
        overlayOpacity: .8
    });

    window.onload = function () {

        // open a welcome message as soon as the window loads
        Shadowbox.open({
            content: '<h2 style="color:#ffffff;">Hello!</h2>',
            //content: '#surveyDialog',
            //content: 'dialog.html',
            player: "inline",
            //player: "html",
            handleOversize: "resize",
            title: "Welcome",
            height: 450,
            width: 950
        });

    };    </script></head><body><div class="content"></div>

<div id="surveyDialog" class="dialogWindowWrapper" style="display:none">
    <h2 style="color:#ffffff;">Hello!</h2>
</div>

0 个答案:

没有答案