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 6629819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:18:53+00:00 2026-05-25T22:18:53+00:00

basically i have a div set up like so: <div class=pane> <div class=banner> <img

  • 0

basically i have a div set up like so:

    <div class="pane">
        <div class="banner">
            <img class="original" src="images/picture.jpg" width="100%" height="100%" />

            <div class="blurred"></div>
            <div class="blurred_colour"></div>
            <div class="focused"></div>

        </div>
    </div>

Ok my script hides .original and then gets the source of it and creates 3 different images for each of the divs. They are all canvas tags generated in javascript.
.blurred contains a desaturated and blurred version of the original. .blurred_colour contains a blurred version but in colour. .focused is just the original image.

Now i also put a border image on top of each div and position relative so it appears on top and not below the divs. So if your keeping track, thats 3 divs, 3 canvas images and 3 border images (png) positioned ontop of the 3 canvas images. And the 3 main divs are stacked on to each other. I animate using alot of opacity changes with jQuery animate.

As you can guess, some browsers display this animation fairly choppy and it will probably be worse with less powerful computers.

My question is, would it be possible to rewrite all of this with just 1 canvas tag while still having all of these animations but also have much better performance then how I am currently doing it?

  • 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-25T22:18:54+00:00Added an answer on May 25, 2026 at 10:18 pm

    It’s difficult to say why, exactly, your code is slow here.

    You don’t have that many DOM elements so that is probably not the issue.

    You should probably profile the code. F12 in Chrome or IE, go to profiler tab, run it, take a look at what is eating up all of the time.

    What is it you are trying to accomplish, exactly? Some kind of blurring effect? Doing all of this in one canvas is probably preferable provided what you are attempting to do can easily be done that way.

    What kind of animation? Are you physically moving DOM elements? That’s bad. From a performance perspective, never do anything with the DOM if you can avoid it. If this is the case then putting everything in one canvas will probably help a lot. Again, its hard to say with such little detail.

    Are you just doing blurring animation? In general, CSS blurring is faster (And easier to write) than Canvas blurring.

    Anyway, the answer is probably not “Too many DOM elements.” It is either too much DOM-heavy stuff or repeated work in the animation loop, or too much DOM interaction when all-in-canvas would be better.

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

Sidebar

Related Questions

basically I have 4 images with divs set up like this: <div id=selector> <div
I have a button set, and would like to set the width of each
I basically have a div with set dimensions and overflow: hidden . That div
ok so basically I have a setup like this: <div id=tabs> <div id=tab_one> Something
I have a set of divs like so: <div id=textArea> <div id=text></div> </div> CSS
I have a div set up something like this: <div id=test> <p>Hello</p> <p style=display:
I currently have a DIV with a background image set as follows: background: url(../images/site/common/body-bannar-bkground.png)
I've been battling to get this right...basically I have the following HTML setup: <div
I basically have something like this: void Foo(Type ty) { var result = serializer.Deserialize<ty>(inputContent);
I basically have three tables, posts, images and postimages (this simply contains the ids

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.