在移动视图中无法单击我的网站上的任何内容

时间:2019-03-06 20:09:48

标签: php html css mobile mobile-website

Google会根据修复手机的情况继续为我提供结果,但是问题出在我的网站上。这是一个奇怪的问题,但是在我网站上的移动设备上,我无法单击任何按钮或链接。桌面工作正常,但移动设备出现问题。我是直接在cpanel上建立此网站,所以我不知道是否需要添加一些特殊代码来检测移动水龙头,我通常使用wordpress,因此我对直接建立网站一无所知在mysqli上。移动水龙头将在容器外部工作,但是我需要它在页面容器内部工作。它位于<div><pre>中。我不太了解问题,这是我的一些代码:

全局样式:

pre{
    border: solid 3px #2b333d;
    border-radius: 10px;
    font-size: 15px;
    color: #3c3d3c;
    margin: 1%;
    padding: 10px;
    background: #eaeaea;
    display: block;
    font-family: monospace;
    white-space: pre-wrap;
}

input{
    border: solid 2px #2b333d;
    border-radius: 10px;
    font-size: 15px;
    color: #3c3d3c;
    margin: 1%;
    padding: 8px;
    background: #f7f7f7;
    font-family: Arial, Helvetica, sans-serif;
    white-space: pre-wrap;
    outline: none;
    display: inline-block;
}

input[type=button], input[type=submit], input[type=reset]{
    border: solid 2px #142135;
    border-radius: 10px;
    font-size: 18px;
    color: #f7f7f7;
    margin: 1%;
    padding: 5px 7px;
    background: #5791ed;
    font-family: Arial, Helvetica, sans-serif;
    white-space: pre-wrap;
    outline: none;
    letter-spacing: 0;
    display: inline-block;
}

form{
    line-height: 0.2;
    white-space: normal;
}

页面/标题样式:

.page_m{
    background: #fcfcfc;
    width: 99.9%;
    left: 0.1%;
    z-index: -20;
    top: 30px;
    position: relative;
}

.page_inner_m{
    padding: 20px;
    z-index: -20;
    position: relative;
    font-family: Arial, Helvetica, sans-serif;
    white-space: pre-wrap;
    color: #2d2d2d;
    letter-spacing: 0.5;
    line-height: 1.55;
    border: 0;
    border-radius: 0;
    font-size: 18px;
    margin: 0;
    background: none;
    display: block;
}

脚本

<?php

?>
<style>
<?php include 'header.css'; ?>
</style>
<?php

echo '<div class="page_m">';

?>
<style>
<?phpinclude 'style_m.css';?>
</style>
<?php

echo '<pre class="page_inner_m">';

//header start
echo '<div class="menu_m">';

$host = $_SERVER['HTTP_HOST'];
preg_match("/[^\.\/]+\.[^\.\/]+$/", $host, $matches);
$domain = "{$matches[0]}\n";

echo '<center class="title_m">'.$domain.'</center>';
echo '</div>';
//header end

echo '</pre></div>';
echo '</div>';
?>

1 个答案:

答案 0 :(得分:0)

修复了问题:D只需将echo '<pre class="page_inner_m">';替换为echo '<body class="page_inner_m">';,并将echo '</pre></div>';替换为echo '</body></div>';

我会继续努力,以防其他人发现它有帮助。用<pre>标签切换<body>标签对我来说解决了这个问题。

相关问题