gpt4 book ai didi

javascript - 暗影盒.js : black text on black background with welcome message on window load

转载 作者:太空宇宙 更新时间:2023-11-04 00:32:44 27 4
gpt4 key购买 nike

我正在使用 Shadowbox.js example code显示带有消息“此站点仍在 build 中!”的阴影框在页面加载时:

<link rel="stylesheet" type="text/css" href="shadowbox.css">
<script type="text/javascript" src="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
});

window.onload = function() {

// open a welcome message as soon as the window loads
Shadowbox.open({
content: '<div id="welcome-msg">This site is still under construction!</div>',
player: "html",
title: "Welcome",
height: 350,
width: 350
});

};
</script>

问题是“此站点仍在 build 中!”文本在黑色背景上以黑色字体显示。

我假设我必须摆弄我的 CSS,所以我添加了:

div.welcome-msg{font-size:12px;padding:10px;text-align:center;color:white;}

./shadowbox/shadowbox.css,但这并没有解决问题。

谁能告诉我如何更改“此站点仍在 build 中!”的字体颜色?文字变白?

提前致谢

最佳答案

尝试使用“div#welcome-msg”代替“div.welcome-msg”。

关于javascript - 暗影盒.js : black text on black background with welcome message on window load,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2321104/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com