我试图将一个可单击的图像居中在到达页面上,该页面链接到受密码保护的目录(folder2)中的另一个页面。我可以使图像居中对齐,但是无法弄清楚如何以正确的方式将图像链接到受密码保护的目录中的页面。当我点击图片时,它将带我到
错误的请求-无效的URL。HTTP错误400。请求URL无效。
页。这是地址栏中URL的显示方式:
http://example.com/“/folder2/index.htmlâ€%C2%9D
如果我使用直接网址,则可以转到该页面
http://example.com/folder2/index.html
如果你们能帮助我解决这个问题,我将非常感激。谢谢!
这是我使用的代码:
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: #1A928A;
}
</style>
</head>
<body>
<div><a href=“/folder2/index.html”><img src="gliph.png"></a></div>
<style>
html, body
{
height: 100%;
margin:0;
padding:0;
}
div {
position:relative;
height: 100%;
width:100%;
}
div img {
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
margin:auto;
}
</style>
</body>
</html>
这是因为您在链接上的报价不是正常的报价。“ 代替 ”
第二个引号也是如此。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句