如何阻止我的视差叠加层干扰我的表单和 link 字段?

How can I stop my parallax overlay from interfering with my form and link fields?

我已经在 PHP 网站的索引页面中实现了简单的视差图像。出于某种原因,由于我实施的视差 header,登录表单出现异常。在那张照片上有一个由 div 放置的图像叠加层,我将其命名为徽标。我可以肯定它是罪魁祸首,因为当我将其注释掉时,表单字段和链接起作用了。该站点位于 http://www.mattmacy.com/greenia/ 。请注意表单域不工作。我已经为我的 3 张图像和徽标 class 添加了我的 css。任何帮助将不胜感激。

<!DOCTYPE html>
<html>
<head>
<title>FORUM</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>

<body style="background-color: maroon";>
<div style= "background-color: gold; border-style: solid;">

//This "logo" div stops my form and link fields from working  
<div class="pimg1">
<div class="logo"></div>
</div>

<div style="background-color: gold; border-style: solid;">
<h1>Matt Macy's Forum</h1>

<?php
session_start();
if (!isset($_SESSION['uid'])){
echo "<form action='login_parse.php' method='post'>
Username: <input type='text' name='username' />&nbsp;
Password: <input type='password' name='password' />&nbsp;
<input type='submit' name='submit' value='Log In'/></form>";
echo "You can joing this site with Admin approval <a 
href='register.php' class='Links'>Register</a>";
}else {
    echo "You are logged in as ". $_SESSION['username']. "with a level 
of " . $_SESSION['level']."<a href='logout_parse.php' 
class='Links'>Logout</a>";
}   if (isset($_SESSION['level']) && ($_SESSION['level'] == 'Admin')){
        echo "<a href='authenticate.php' 
class='authenticate'>Authenticate</a>";
        echo "<a href='postAudiowithPayPal.php' 
class='postAudiowithPayPal'>Post audio with PayPal</a>";

}
echo"</div><br>";
//This is my second parallax image that doesn't cause difficulty
echo"<div class='pimg2'><span class='border'></span></div>";

这是我的 style.css 文件。我不确定我是否需要设计我为我的链接指定的链接 class 的样式。

.pimg1{
background-image:url('pimg1.jpg');
min-height:100%;
height:600px;
}

.pimg2{
background-image:url('pimg2.jpg');
min-height:100%;
height:500px;
}
.pimg3{
background-image:url('pimg3.jpg');
min-height:100%;
height:500px;
}

@media(max-width:568px){
.pimg1, .pimg2, .pimg3{
    background-attachment: scroll;
}
}

.logo{
height: 100%;
width: 100%;
background-image:url('SpiritualAutomaton2.png');
position: center;
background-repeat: no-repeat;
position: absolute;
top:50%;
margin-top:-50px;
margin-left:130px;


}
.Links{
      ?
}

问题是您的 .logo 身高。尝试使用与用作背景的图像相同的尺寸。您可以在此图像中看到,将鼠标放在最左侧的输入上并向右移动,徽标 div 挡住了下面的元素。另一种选择是在 .logo 元素上设置 pointer-events:none;,但在这种情况下有点 hacky。