[英]How to set width to Mobile screen size using HTML / CSS
I am developing a website Register page. 我正在开发一个网站注册页面。
if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false)
With the above trap, I directed the page to a separate mobile page, where the problems started with setting the width. 通过上面的陷阱,我将页面定向到一个单独的移动页面,在那里,问题开始于设置宽度。
in the mobile page, I tried setting the width in CSS like width="auto"
, width=100%
and even a width element, but still the Register page occupies just 30%-40% of the screen ( used align: left
) and not visible. 在移动页面中,我尝试在CSS中设置宽度,例如
width="auto"
, width=100%
甚至是width元素,但是Register页面仍然只占据屏幕的30%-40%( used align: left
)并且不可见。
I am using PHP and MySQL. 我正在使用PHP和MySQL。
Please help me how to come out of this problem 请帮我解决这个问题
Take a look at this page: https://www.w3schools.com/html/html_responsive.asp 看一下此页面: https : //www.w3schools.com/html/html_sensitive.asp
There is an explanation on it as wel as examples. 作为示例,对此有一个解释。
see: <meta name="viewport" content="width=device-width, initial-scale=1.0">
请参阅:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.