首页 \ 问答 \ 如何在不失去可扩展性的情况下为网页(HTML / JS)制作动画?(How to animate a webpage (HTML/JS) without losing scalability?)

如何在不失去可扩展性的情况下为网页(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
更新时间:2024-02-09 09:02

最满意答案

尝试这个:

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是状态代码,而不是错误代码。 这意味着服务器正在将您重定向到另一个页面。 但状态OK和Found。 问题通常是由启用了mod-security且过滤器引擎过滤上传的服务器引起的。 要解决此问题,请将此代码添加到您的主机帐户的.htaccess文件中(如果您是客户端),或者如果您是管理员,请在apache配置中进行编辑: SecFilterEngine Off SecFilterScanPOST Off 302 is a st ...
  • 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://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 ...
  • 默认的PHP会话处理程序机制使用 Cookie和用户代理将会话与用户进行匹配。 由于Flash使用“ShockWave Flash”的用户代理向服务器标识自己,该用户代理与浏览器的UA不同,因此php会为请求分配新会话。 如果输出_POST数据然后将这些值与session_start()之后得到的值进行比较,或者将浏览器UA更改为与Flash发送的完全匹配,则可以检查此项。 解决方案? 将会话ID以任何方式传递给服务器,默认为_POST ,并使用正确的id初始化会话。 SWFUpload为您提供post_p ...
  • 将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 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)