gpt4 book ai didi

jquery - 图片丢失

转载 作者:太空宇宙 更新时间:2023-11-03 18:30:03 25 4
gpt4 key购买 nike

我这里有一个“测试”数据库:

http://www.bayingwolf.com/addRecords.asp

如果您单击“添加记录”,会弹出一个模态表单,并且在该表单的右上角应该有一个带有“X”的小 PNG 图像以关闭该表单。

它应该是这样的:http://www.ericmmartin.com/projects/simplemodal-demos/ (在“基本模态对话框”下单击“演示”)并放置 X 图像。

在下载中,作者在他的 index.html 页面上使用了以下内容:

<!-- preload the images --> 
<div style='display:none'>
<img src='img/basic/x.png' alt='' />

我也做了同样的事情。当我在我的桌面上打开他的 index.html 页面时,我可以看到 X 图像(我无法在我的桌面上打开我自己的页面,因为它是一个 ASP 文件)但是,奇怪的是,当我将他的 index.html 文件上传到我的服务器我看不到图像。

我仔细检查了服务器路径,我的 X 图像位于名为“basic”的文件夹中,该文件夹位于另一个名为“img”的文件夹中。

控制图像定位的 CSS(在 basic.css 中)如下所示:

#simplemodal-container a.modalCloseImg {
background: url(../img/basic/x.png) no-repeat;
width: 25px;
height: 29px;
display: inline;
z-index: 3200;
position: absolute;
top: -15px;
right: -16px;
cursor: pointer;
}

我的代码不是原始代码的复制品 - 我的页面上有一个表单,但这不应该影响 X 图像的定位。

有什么建议吗(我已经研究这个至少两天了!)?

谢谢

最佳答案

您在问题中提供的 CSS 没有出现在您的 basic.css 样式表中。相反,你有这样的东西:

#simplemodal-container a {color:#ddd;} /* <-- bracket closed */


{background:url(x.png) no-repeat; /* <-- CSS parse error */
width:25px;
height:29px;
display:inline;
z-index:3200;
position:absolute;
top:-15px;
right:-16px;
cursor:pointer;}

您可能不想在 color 属性之后关闭这个大括号。所以清理你的 CSS:

#simplemodal-container a.modalCloseImg {
color: #ddd;
background: url(x.png) no-repeat;
width: 25px;
height: 29px;
display: inline;
z-index: 3200;
position: absolute;
top: -15px;
right: -16px;
cursor: pointer;
}

关于jquery - 图片丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20003549/

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