6,313 questions
0
votes
1
answer
98
views
Animate a div between width constrained and a height constrained, also keeping the same aspect ratio as the img
I have a div containing an image. The image is user supplied so it can be tall or wide or square. By default I want to keep the image at a fixed 36px height, its width expanding as needed according to ...
0
votes
1
answer
40
views
transition on bootstrap column width is sluggish
i want to apply transition on bootstrap columns width when open state changes, the transition works but it's sluggish, it's not smooth at all
layout.js
"use client";
import { useState } from ...
0
votes
1
answer
38
views
Bottom border animation is not activating
<section className="accessories bg-blue-600 p-8">
<div className="container max-w-7xl my-0 mx-auto">
<div className="accesories-wrapper">
&...
0
votes
1
answer
127
views
Transition in mask-image
I have a container where a fade is being applied on the right hand side but I want the fade to transition in. So on load the content is shown and then the mask-image transitions in smoothly. Any idea?
...
0
votes
1
answer
64
views
CSS transitions work only intermittently in Firefox
I have a simple static HTML page with JavaScript and CSS embedded:
const outerBox = document.getElementById("outerBox");
const innerBox = document.getElementById("innerBox");
const moveOutBtn = ...
1
vote
4
answers
248
views
Change CSS property after transition
I have a button to toggle opening and closing of a dropdown menu with CSS transition. Suppose I have this HTML for a dropdown menu and a toggle button:
<button type="button" id="main-...
0
votes
1
answer
88
views
How can I animate an element that shows up after a function is called?
I've been trying to make my navbar responsive for mobile and decided it'd be good to make it a lateral bar when the width gets smaller. Also, in order to not having to change the code in every single ...
0
votes
2
answers
58
views
Define both element dimensions based on one parent dimension
:root {
--success: #0c0;
}
button {
border: 2px solid;
border-radius: 10px;
cursor: pointer;
margin: 1em 0.5em;
padding: 10px 15px;
transition: transform 1s;
}
button:...
1
vote
1
answer
73
views
Animate transform-origin while maintaining previous rotation position
I am trying to animate a "left" to "right"-side rotation using transform-origin. More specifically, I would like to maintain the left side's rotation position when the transform-...
2
votes
1
answer
166
views
How would I go about smoothly animating (in CSS only) the elements in a drop down list with a slide-down approach?
(I'm still pretty new to HTML and CSS so bare with me) I've been trying to customize this website to make it more pleasing to the eye. One of the things I'd like to do is customize the drop down menus ...
3
votes
1
answer
71
views
Difficulties with fade-out/in javascript animation for website content
On my site, I have a container that holds multiple 'pages' of information. When a button is clicked, the current content page disappears and the next one appears on screen, allowing viewers to cycle ...
0
votes
1
answer
58
views
the transition-color aren't working correctly
I have a button that changes the theme color on navBar and it's working. When I click the button, the background color changes faster then the text colors. The "Home", "Cadastros", ...
0
votes
1
answer
106
views
Why does my ease transition speed up, when revealing and hiding a div?
I am creating an accordion type of question and answers page for a recent project. The answer to the question is revealed by clicking on the question. My approach is to have the answer hidden with max-...
1
vote
1
answer
71
views
How to avoid mismatched background colors during CSS transitions with transparency? [closed]
Scenario
I recently made an interesting observation in my CSS that took me a little while to understand exactly what was happening.
For example, consider the following code snippet, in which the ...
-1
votes
1
answer
91
views
Issue with CSS for overflow for dropdown
I have created this dummy top nav bar, where i have multiple drop-down which can be scrollable on x axis via buttons if multiple . But when i open the dropdown it is being opened in scroll view for y ...
-1
votes
1
answer
78
views
Why is my css animation not working on closing the element using React useState hook
I have build a sliding submenu with React, Typescript and Tailwind.
The related submenu is showing using React useState hook.
See the working code sandbox here.
Why is my close css animation not ...
0
votes
0
answers
47
views
Why doesn't transition work on <aside> to smoothly adjust width when hovered? [duplicate]
I'm trying to create a layout where an aside element smoothly increases its width when hovered.
The grid is set up using grid-template-columns: max-content 1fr, and I expect the aside element to ...
1
vote
1
answer
103
views
css transition property does not work when setting state using mousenter event
I want to show an animated text next to the button upon hovering the button. This works fine when I am using click event on button but doesn't work when using mouseenter and mouseleave events.
I'm ...
0
votes
0
answers
58
views
Dropdown menu works on Chrome device mode but not on iOS
I've used the code from this link:
https://dev.to/ljcdev/easy-hamburger-menu-with-js-2do0
I've changed the TS part into this (I'm working with Angular):
toggleMenu() {
if (this.menu.classList....
1
vote
0
answers
56
views
I'm unable to use transition: to work in a CSS component
I can't get CSS to work in one particular part of my project. Works fine with other components.
index.tsx
const toggleMenu = () => {
setMenuOpen(!menuOpen);
}
return (
....
...
0
votes
0
answers
13
views
The max-height of accordion element causes delay when folding with a cubic bezier animation [duplicate]
I created an accordion in React, but when I expand an item of it it takes a while before it collapses.
Now, I found out why that takes a while. It's because the height of the hidden part (in this case,...
0
votes
1
answer
527
views
svelte transition:slide is jumpy when component switch with different height happen
i have a two forms, one for sendOTP and the other one for verifyOTP and the verify otp one is taller than the send otp. the height transition for my container is jumpy on getting back from second form ...
1
vote
2
answers
96
views
How to prevent text moving when transitioning sibling element's width
I'm developing a website that will have a "learn more" button that's split in two, one part says "learn more" and the other says "+". When the mouse hovers over it the &...
1
vote
0
answers
79
views
transform transition image 'jumping' at start and end of animation
So I have a div that I want to expand (along with all elements it contains) when hovered over.. it's mostly working except at the start and end of the animation the background image 'jumps' to an odd ...
0
votes
3
answers
290
views
CSS circle progress bar is not animating
I am unable to get the circle bar to animate. I attempted adding transition: all 600ms ease; but that didn't work. I am not sure if CSS animation supports conic-gradient.
jQuery(function ($) {
$(...