Ensuring the responsiveness of CSS and jQuery animations

Issues Encountered:

  • The animation I implemented lacks responsiveness as images and text tend to move around and appear disproportioned on smaller screens.
  • The .moveup class fails to animate properly despite numerous attempts to set up CSS transitions correctly. Upon adding the class through jQuery, the affected pictures simply jump instead of animating smoothly.

Project Background:
I am currently developing a website that includes a short animation before the welcome section slides aside, revealing the main content of the site/application underneath.

My project utilizes Bootstrap 3 framework along with Animate.css for animations, in addition to my custom .moveup class.

I am facing significant challenges in maintaining the responsiveness of my animation. Any changes in screen size result in various issues that are overwhelming for me to handle.

About the Animation:
The animation comprises 5 elements sliding up in sequence - #ani_text_1, #ani_plus, #ani_text_2, #ani_equals, and #ani_text_3. Afterward, 3 other elements - #ani_mcloud, #ani_man, and #ani_check slide down. Finally, #ani-plus and #ani_equals move further up between them, concluding the animation.

Code Snippets:
HTML Content:

<div class="container-fluid">
 <!-- Your HTML code goes here -->
</div>

CSS Styling:

 /* Your CSS styling rules */

JavaScript (jQuery):

// Your JavaScript/jQuery script

Answer №1

While waiting for a response, I'll share my thoughts on the situation. After checking the provided link, I didn't see an example of the Welcome animation mentioned (possibly disabled at the moment). It may be challenging to give a detailed answer without that reference.

Regarding the .moveup class animation on the #ani_plus element, it seems the main target property is bottom. A starting value should be set on the element before the animation takes effect for it to work correctly (currently missing from the element). Add this:

#ani_plus {
  bottom: 0;
}

This ensures the transition knows the initial value to animate from. It's recommended to use the transform property for the animation and leave the element in its final position. Try something like this:

#ani_plus {
  transform: translateY(10%);
  transition: transform 2s ease-in-out;
}

.moveup {
  transform: translateY(0%);
}

Using transform is faster to render and easier to maintain as you don't have to worry about the final position.

In terms of responsive views, I suggest tackling one element at a time to avoid feeling overwhelmed. Adjust elements as needed by gradually decreasing the viewport size until it doesn't look good, then make necessary changes. Repeat this process until everything looks perfect.

If you can provide a demo showcasing the responsive issues, I'd be happy to assist with debugging and ideas. Feel free to reach out. Hopefully, some of these suggestions are helpful!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

extra header in table

Hey guys, I'm not really into design and I could use some help. My CSS seems to be creating an extra head on my <tr> element. I used a CSS table generator to create the CSS code and employed a PHP HTML to build my table. <html> <title& ...

Customizing the cursor for disabled custom controls in Bootstrap 4

I'm having trouble changing the cursor for disabled custom-control elements like checkboxes and radiobuttons. The following style isn't working as expected: .custom-control-input:disabled ~ .custom-control-label::before { cursor: not-allowe ...

Interactive Form directly linked to SQLite3 database

Looking for assistance with converting a modal from static, fake data to dynamic data from an SQLite3 database. The goal is to display a table of existing data and allow users to add new rows by clicking a +New button. However, when trying to incorporate ...

Automatic page updates triggered by code modifications

I am currently working on a .NET ASPX page where I usually write my classes separately in the app_code folder. However, for this specific page, I needed a temporary class that is only required by this page. So instead of creating a separate file, I decid ...

What could be causing this TypeScript class to not perform as anticipated?

My goal with this code snippet is to achieve the following: Retrieve a template using $.get(...), Attach an event listener to the input element within the template I am using webpack to transpile the code without encountering any issues. The actual cod ...

Interactive Progress Bar implemented with Jquery and AJAX

I have a current AJAX setup on my website where I submit data via AJAX and receive a response that is displayed on the screen. However, while the server is processing the response, I would like to implement a progress bar. My idea is that I can sen ...

I'm having trouble making my jQuery banner responsive - which property should I be using in this situation?

I am experiencing an issue with my jQuery banner not shrinking properly. In my mobile.css file, I have set the class .banner width to 100%, but it is not shrinking to a width of 260px as expected. I would like to know which property I need to use in orde ...

What R package is capable of analyzing HTML strings to identify words that are formatted as bold, italic, and other styles within the text?

I am facing a challenge with my dataset that contains a column of HTML content. Each entry in this column represents a paragraph of HTML code. Here is an example: html <- "<p id="PARA339" style="TEXT-ALIGN: left; MARGIN: 0pt; LINE ...

The show-word-limit feature is malfunctioning on the element.eleme.io platform

After attempting to utilize the show-word-limit attribute of the input element, unfortunately the character count did not display. Below is the code snippet that was used: <el-input type="textarea" placeholder="Please input" ...

What is the best way to incorporate arrow buttons on my website in order to unveil various sections on the homepage?

A colleague and I are collaborating on a website for his cookery business. He has sketched out some design ideas on paper, one of which involves having a homepage with 4 different sections stacked on top of each other. Each section would have an arrow butt ...

Inquiry about CSS Media Queries

I am facing an issue with CSS media queries... For my HTML page, I have separate files for desktop and iPad styles - desktop.css and ipad.css. In desktop.css, I have used @import url("ipad.css"); and added a @media not only screen and (device-width:768px) ...

Unable to expand the dropdown button collection due to the btn-group being open

Having trouble with the .open not working in Bootstrap 4.3 after adding the btn-group class to open the dropdown... I am looking for a way to load the dropdown without using JavaScript from Bootstrap. This is the directive I am trying to use: @Host ...

Using jQuery to focus on the selected element after a change event

What is the best way to focus after jQuery plugin chosen has been activated? I attempted to use this code, but it did not have the desired effect: HTML: <select id="producer_id"> <option value="a">A</option> <option value="b ...

The menu vanishes when the screen size is reduced

Can't figure out why my JavaScript is causing issues with my menu. I've made a mistake in the JavaScript file, but in general it's working fine. The problem arises when you load the page with a width less than 858px, then click on one of th ...

What are the steps for publishing a Three.js project on github pages?

Currently, I've been putting together my own personal portfolio website which involves using the Three.js library. The library has been downloaded onto my laptop and when running locally, everything works smoothly. Now, I want to move forward by deplo ...

Transmit an array from JavaScript to PHP

My goal is to take the information from the dropdown menu options and save it into my database table. The two fields in my table are 'id_country' and 'country_name'. The 'id_country' field in the database gets its value from ...

Aligning a lowercase "i" element within a container

Is there a more effective way to center the "i" element within this div without using specific pixel margins that adjust based on hover? Below is my code snippet: HTML: <div class="nav-collapse"> <i class="fa fa-bars fa-2x" id="bars"></ ...

"Attempting to troubleshoot a calculator built with html, css, and js. I'm stumped as to what could

After following a tutorial on YouTube, going over the code multiple times, and still experiencing issues with the calculator. Sometimes it works fine, other times certain buttons like (+, -, x, ⁄) don't function properly. I've provided the enti ...

Instructions on displaying a pop-up message upon clicking the edit button with the use of javascript

How can I display a popup message box when the edit button is clicked on my PHP page? I want to confirm before passing data to the edit page, but currently, the data is being sent without displaying any message. Any suggestions on how to fix this issue w ...

A method for displaying a message to the user within an input div based on a database value using an if statement

Having some trouble with this code, can anyone offer assistance? The v_central_locking value should be either 0 or 1. Here is the code snippet to display the value fetched from the database: <?php <!--box start--> ...