gpt4 book ai didi

javascript - HTML 在所有设备上响应

转载 作者:行者123 更新时间:2023-11-28 15:15:32 26 4
gpt4 key购买 nike

我已经尝试了各种方法,但当您拖动窗口或使用手机时,我根本无法让我的网页自动缩放,我已经创建了 script.js 和 css。

这是代码,你能告诉我或者把css和js的代码发给我吗?

谢谢和抱歉

<html xmlns="http://www.w3.org/1999/xhtml" class="sr-lang-en" lang="en"
<head>
<link rel="stylesheet" type="text/css" href="design.css">
<meta name=viewport content="width=device-width, initial-scale=1">
<title>Rivalo Willkommensbonus </title>
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="icon" href="/favicon.ico" type="image/ico" />
</head>
<div id="content">
<body class="theme">
<div id="themeBackground" style="background: url(bg.jpg);padding-top:130px;padding-left:00px;padding-bottom:130px;">
<div class="wrapper">
<div class="container">
<center>
<div id="content" class="left">
<div id="main_wide">
<div class="cms_richtext">
<div class="box">
<a href="https://www.rivalo.com/de/wettkonto-anmelden/">
<div style="background:url(header_de_main-min.jpg) top center no-repeat;width:1011px;height:494px;"></div>
</a>
<div style="margin-top:20px;margin-left:40px;width:950px;">
<a href="https://www.rivalo.com/de/wettkonto-anmelden/">
<style scope="" type="text/css">
div.box1 {
opacity: 0.9;
filter: alpha(opacity=90); /* For IE8 and earlier */
}
div.box1:hover {
opacity: 1.0;
filter: alpha(opacity=100); /* For IE8 and earlier */
-webkit-box-shadow: inset 0px 0px 0px 1px rgba(255,255,255,1);
-moz-box-shadow: inset 0px 0px 0px 1px rgba(255,255,255,1);
box-shadow: inset 0px 0px 0px 1px rgba(255,255,255,1);
}
</style>
</a>
<a href="https://www.rivalo.com/de/casino-spielen/">
<div class="box1" style="width:219px;height:173px;float:left;background:url(header_de_1-min.jpg) top center no-repeat;margin-right:9px">&nbsp;</div>
</a>
<a href="https://www.rivalo.com/de/live-wetten/">
<div class="box1" style="width:220px;height:173px;float:left;background:url(header_de_2-min.jpg) top center no-repeat;margin-right:9px;margin-left:9px">&nbsp;</div>
</a>
<a href="https://www.rivalo.com/de/sportwetten-bonus/">
<div class="box1" style="width:220px;height:173px;float:left;background:url(header_de_3-min.jpg) top center no-repeat;margin-right:9px;margin-left:9px">&nbsp;</div>
</a>
<a href="https://www.rivalo.com/de/wettkonto-anmelden/">
<div class="box1"style="width:220px;height:173px;float:left;background:url(header_de_4-min.jpg) top center no-repeat;margin-right:9px;margin-left:9px">&nbsp;</div>
</a>
<div style="clear:both">&nbsp;</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</center>
<script type="text/javascript">
TableHeight();
</script>
</body>
</html>

最佳答案

您在代码的以下行中缺少围绕“viewport”的引号:

<meta name=viewport content="width=device-width, initial-scale=1">

应该是

<meta name="viewport" content="width=device-width"; initial-scale="1.0" />

关于javascript - HTML 在所有设备上响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44478273/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com