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

问题描述 投票:-1回答:1

谷歌一直根据修复我的手机给我结果,但问题出在我的网站上。这是一个奇怪的问题,但在我网站上的移动设备上,我无法点击任何按钮或链接。桌面工作正常,但移动有问题。我直接在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>';
?>
php html css mobile mobile-website
1个回答
0
投票

修正了它:D只需要用echo '<pre class="page_inner_m">';替换echo '<body class="page_inner_m">';并用echo '</pre></div>';替换echo '</body></div>';

如果其他人觉得有帮助的话,我会继续这样做。用<pre>标签切换<body>标签解决了我的问题。

© www.soinside.com 2019 - 2024. All rights reserved.