【发布时间】:2019-03-06 20:09:48
【问题描述】:
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>';
?>
【问题讨论】:
-
您提供的代码中没有任何链接或按钮。
-
对于初学者,请尝试
type="button",而不是botton。 -
请参阅stackoverflow.com/help/mcve。您需要给我们一个我们可以看到并帮助调试的问题的实际示例。甚至在您的问题中不包括相关的 代码 都会让这变得非常困难。
标签: php html css mobile mobile-website