如何在不失去可扩展性的情况下为网页(HTML / JS)制作动画?(How to animate a webpage (HTML/JS) without losing scalability?)
我试图通过制作一个类似小镇的地图来使我的网页更具互动性,不同的建筑物可以点击并导致我网站上的不同页面,但是我很难用HTML /动画网页JS甚至在调整窗口大小后也保持不变。
这是我的测试网站,为了清晰起见: https : //people.ucsc.edu/~anlin/test# (我目前只是在地图的png和鼠标悬停时移动的建筑物的gif之间切换)
我怎样才能做到这一点,我应该使用除了普通的html / js之外的其他东西吗?
谢谢!
I'm trying to make my webpage more interactive by making a small town-like map, with different buildings that are clickable and lead to different pages on my site, but I'm having a lot of difficulty animating the webpage with just HTML/JS and also making it stay the same even after resizing the window.
This is my test site right now, for clarity: https://people.ucsc.edu/~anlin/test# (I am currently just switching between a png of the map and a gif of the buildings moving when the mouse is hovering)
How can I accomplish this, and should I be using something other than plain html/js to do this?
Thanks!
原文:https://stackoverflow.com/questions/46186220
最满意答案
尝试这个:
ErrorDocument 404 /send302.php
然后,在send302.php中你可以做类似的事情
header('HTTP/1.1 302 Found');
Try this:
ErrorDocument 404 /send302.php
Then, in send302.php you can do something like
header('HTTP/1.1 302 Found');
相关问答
更多-
所接受的答案不适用于所给出的理由。 我发表了一篇评论,其中提到了一个问题的链接,该链接描述了黑客绕过浏览器透明处理302的问题: 如何在jQuery Ajax调用后管理重定向请求 然而,这是一个肮脏的黑客,经过大量挖掘后,我发现我认为是一个更好的解决方案 - 使用JSON 。 在这种情况下,您可以使所有对ajax请求的响应具有代码200,并在响应主体中添加某种类型的JSON对象,然后您的ajax响应处理程序可以以适当的方式使用该对象。 The accepted answer does not work fo ...
-
相当令人惊讶的是,问题似乎是您发送了“位置”标题而不是标准的“位置”标题。 我做了一个快速测试似乎证实了这一点,但我仍然无法相信,所以我做了一个快速的网络搜索,发现其他人确认Chrome确实是一个如此坚持,它不会接受HTTP标头与错案。 对PHP手册的评论提到IE7具有相同的怪癖。 Rather surprisingly, the problem seems to be that you are sending a 'location' header instead of the standard 'Loc ...
-
302不是错误,而是重定向到临时位置。 您可以将请求重新发送到响应头中收到的新位置。 302 is not an error but a redirect to a temporary location. You could resend the request to the new location received in the response header.
-
尝试这个: ErrorDocument 404 /send302.php 然后,在send302.php中你可以做类似的事情 header('HTTP/1.1 302 Found'); Try this: ErrorDocument 404 /send302.php Then, in send302.php you can do something like header('HTTP/1.1 302 Found');
-
文件上传302?(File upload 302?)[2022-08-19]
302是状态代码,而不是错误代码。 这意味着服务器正在将您重定向到另一个页面。 但状态OK和Found。 问题通常是由启用了mod-security且过滤器引擎过滤上传的服务器引起的。 要解决此问题,请将此代码添加到您的主机帐户的.htaccess文件中(如果您是客户端),或者如果您是管理员,请在apache配置中进行编辑:SecFilterEngine Off SecFilterScanPOST Off 302 is a st ... -
302找到错误信息(302 Found error message)[2022-05-22]
URL后面需要一个空格: # here -----------------------------------------v RewriteRule ^(.*)$ http://insurancetailors.co.uk [R=301,L] 没有空间,apache假设您想要302重定向到URL: http://insurancetailors.co.uk[R=301,L] : http://insurancetailors.co.uk[R=301,L] ,这不是您想要的,并且实际上是抛出500服务器错误 ... -
CURL HTTP 302错误(CURL HTTP 302 Error)[2022-04-22]
你的方法是错的。 首先使用curl浏览登录页面( http://madstore.su/login.php ),以便它可以将cookie存储到文件中。 然后进行卷曲发布并使用之前保存的cookie。 此外,您缺少此POST参数,因此请将此参数与您的数据相加。 $data['btnLogin'] = "Log in"; 登录完成后,使用最终curl的GET浏览所需页面。 Your approach is wrong. First browse the login page(http://madstore.s ... -
swfupload 302错误(swfupload 302 error)[2022-03-13]
默认的PHP会话处理程序机制使用 Cookie和用户代理将会话与用户进行匹配。 由于Flash使用“ShockWave Flash”的用户代理向服务器标识自己,该用户代理与浏览器的UA不同,因此php会为请求分配新会话。 如果输出_POST数据然后将这些值与session_start()之后得到的值进行比较,或者将浏览器UA更改为与Flash发送的完全匹配,则可以检查此项。 解决方案? 将会话ID以任何方式传递给服务器,默认为_POST ,并使用正确的id初始化会话。 SWFUpload为您提供post_p ... -
在使用Indy下载时,我应该怎样处理“302 Found”异常?(What should I do about “302 Found” exceptions when downloading with Indy?)[2022-01-05]
将TIdHTTP.HandleRedirects属性设置为True。 默认情况下为False。 function FetchUrl(const url: string): string; var idhttp : TIdHTTP; begin idhttp := TIdHTTP.Create(nil); try idhttp.HandleRedirects := True; Result := idhttp.Get(url); finally idhtt ... -
第一和第二种情况描述了相同情况的变体:您通过POST提交表单,服务器处理它并将客户端重定向到成功页面或返回到表单。 对于这两种情况,“303见其他”是正确的答案。 这是在服务器正确处理POST请求后使用GET方法将客户端重定向到资源的正确方法。 根据规格: 此方法主要用于允许输出POST激活的脚本以将用户代理重定向到选定的资源。 对于案例3,500代码通常适用于大多数关键错误。 Cases one and two describe variants of the same situation: you su ...