Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6684475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:56:39+00:00 2026-05-26T04:56:39+00:00

I plan to build a game an have everything in mind. I know HTML,

  • 0

I plan to build a game an have everything in mind. I know HTML, CSS and Javascript good and it would give me cross browser support so going to use it for sure.

I have a need where I need to show a div (rectangle) and then upon some action animate it to the other shape which you can better see in this picture

Can I animate DIV element or I would need to use SVG or Canvas otherwise?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:56:40+00:00Added an answer on May 26, 2026 at 4:56 am

    For drawing arbitrary shapes in the browser, I would suggest using either Canvas or SVG.

    I would avoid trying to ‘drawing’ using HTML <div> elements and CSS. This is possible, but it is a hack at best and can get quite messy, and I certainly wouldn’t want to write a game using this technique.

    So your best choices are definitely either SVG or Canvas.

    The choice of SVG vs Canvas depends as much on what platforms/browsers you want to support as it does on the properties of the two technologies.

    Obviously you already know the main difference between SVG (vector graphics) and Canvas (pixel graphics), but the two have differing browsers support as well, which is important to take into account.

    With the limited information you’ve given, I would say that SVG looks like the most natural fit for what you’re doing. However, SVG is not yet supported by the Android browser, so if you want your game to run in mobile devices, you need to take that into consideration. This would probably mean you need to use Canvas instead.

    If you’re sticking to the desktop, all modern browsers support both Canvas and SVG. Obviously both are missing from IE8 and earlier, but IE does support a competing format called VML, which is an XML-based vector language similar to SVG.

    If you want to support IE8 (and it’s quite possible that you don’t!), there are javascript libraries available for IE which will render both Canvas and SVG graphics using IE’s VML engine. Obviously this works very well for SVG as the two languages are quite similar. I’ve heard slightly more mixed reports about the canvas conversion, but you may want to give it a try. Bear in mind that IE8’s Javascript engine is quite slow, so a javascript-based graphics format conversion may not give you sufficient performance to be useful in the context of a game.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My friend and I have plan to build a web shop. One of the
I plan to build something like pricegrabber.com/google product search. Assume I already have the
I have a plan to build a web-site which running CGI made with Cocoa.
I have a webapp build plan running on a Continuous Integration system ( Atlassian
I plan to build a websites that come to target specific countries and each
I plan to build a small audio-recorder app in C#. My laptop has a
I plan to build a database management system using Grails as the main framework.
I'm looking to build a query that will use the non-clustered indexing plan on
I'm using Perl/Tk to build the GUI for an application. I plan on adding
I plan to have 2 projects. 1. mbtech.crm.mvc 2. mbtech.crm.tests I will have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.