CSS: make hover animation smooth

CSS: make hover animation smooth

Content Index :

CSS: make hover animation smooth
Tag : html , By : jch
Date : November 25 2020, 12:01 PM

will help you I have simple animation with CSS on hover. My issue is when I hover on box first in animation is not smooth but animation out is smooth. , To avoid overriding your transition property, you should merge them :
.zoom {
    display: flex;
    justify-content: center;

.zoom .box{
    padding: 16px;
    transition: background-color .6s ease, transform .6s;

.zoom .box:hover {
    transform: scale(1.2);
    background-color: #BD8A3B;

.box {
    width: 200px;
    height: 600px;
    background-color: #DACDBD;
<section class="zoom">
            <div class="box">
                <span class="bold">Pwinw wjdnw wndi</span>
                <span class="number">5,5 % - 6,6%</span>
                <span class="light">dwjndwj dwjndw dw</span>
                <span class="bold">wdjwndk wdniwd knj</span>

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Smooth end to transition from a CSS animation triggered by :hover

Tag : css , By : gorbiz
Date : March 29 2020, 07:55 AM
I hope this helps . Unfortunately, with the way the CSS animations work, there is no easy way to do this. You could use the animation-play-state property, but that would simply freeze the animation at its current frame when you are no longer hovering.
My recommendation would be to use JavaScript to add a class on hover, which then triggers one full cycle of the animation.

jQuery .hover() animation not smooth - Small bump/jerk on hover effect

Tag : javascript , By : Oli
Date : March 29 2020, 07:55 AM
should help you out This is due to the fact that you only wirte top: 0. Try writting top: 0% like this :
$(this).find('a').animate({'top': '0%'}, 'slow');

Why is it that when using JQuery, when I hover, there's no smooth animation?

Tag : javascript , By : user119985
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further addClass and removeClass api of Jquery doesn't provide any animation. They are just meant for adding or removing class.
If you want to achieve animation, then you must add transition in the class you are adding.
.elementoBarra1 {
  background-color: black;
  width: 100px;
  height: 200px;
  -webkit-transition: background-color 1s linear;
  -moz-transition: background-color 100ms linear;
  -o-transition: background-color 1s linear;
  -ms-transition: background-color 1s linear;
  transition: background-color 1000ms linear;

.elementoBarra1:hover {
   background-color: red;
   -webkit-transition: background-color 1s linear;
   -moz-transition: background-color 100ms linear;
   -o-transition: background-color 1s linear;
   -ms-transition: background-color 1s linear;
   transition: background-color 1000ms linear;

Smooth CSS rotate animation on hover

Tag : css , By : user150744
Date : March 29 2020, 07:55 AM
wish of those help Here's an idea where it adds an extra pseudo element only when you're hovering :
.btn:after {
  content: '';
  width: 300px;
  height: 150px;
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);

.btn:hover:after {
  display: block;

How can I make continuous animation attached to an svg inside a button on hover smooth?

Tag : javascript , By : user177910
Date : March 29 2020, 07:55 AM
I hope this helps . I am working on a codewars link (a div). I would like the svg inside the div to rotate continuously on hover. The resulting hover effect is far from smooth, the svg jumps when the mouse rolls over it. The mouseout event is commented out because it makes it worth. What is the best way to optimize this? Codepen: https://codepen.io/forTheLoveOfCode/pen/MOvRNb , Here, I deleted svg transformation and made CSS only solution.
#codewars-butn:hover svg{
  animation-name: rotate;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;

@keyframes rotate {
  from { transform: rotate(0deg) }
  to { transform: rotate(360deg) }
Related Posts Related QUESTIONS :
  • How to hide a list element in html
  • How to stop repeating image
  • How do I prevent the GET method from encoding HTML special characters in the URI?
  • CSS/HTML: How do I change the color of the check mark within the checkbox input?
  • attaching a file path in a html form
  • Flip <canvas> (rotate 180deg) after being published on page
  • Is there an application I can show a client the speed of their site via differring internet connections?
  • Html / Email / Distribution list problem from a noob
  • Inspiring web experiments and technical demos
  • Can I load javascript code using <link> tag?
  • Lisp-style quotation in HTML
  • How to put text float around image like some newspapers' format using CSS?
  • Technical reasons for not having large background images in websites
  • HTML 5 Structure tags demo
  • Angular - String interpolation of undefined variable
  • Is there any way to edit specific Column of table using mat-table in Angular material
  • How can I set a text as a shadow for a heading element?
  • How to fix the forms making the buttons overlap
  • Splitting XML into multiple HTML pages with XSLT?
  • How to justify empty divs in flex container
  • How to blur in CSS only one layer of when you have multiple layers in background-image?
  • Scrollable html table with fixed first row and first column, along with angular material controls within the cells of ta
  • In Django, how to extract ID attribute from html Input tag, WITHOUT using django forms
  • how to fix link tag in html after changing css
  • How do I add a top padding to the second row?
  • Is it possible to split XML into multiple HTML pages with page navigation?
  • AngularJS: responsive height in bootstrap
  • Hide second line of text with CSS
  • repeating-linear-gradient not working in Edge browser and internet Explorer Browser
  • how to make search and form category merges like amazon on bootstrap
  • Bootstrap: Rearranging rows into columns and changing the order of elements
  • How can I move a label under a text box?
  • How save LinearGradient To database
  • How to reposition an image with a linear gradient using css?
  • HTML audio will not play when page opened by batch file
  • CSS Three Tone Diagonal Background
  • How to use slots inside of template components in HTML
  • Using span tags in meta description & title, for dual languages
  • How to make an icon/span selectable by pressing Tab key?
  • Add dynamic margins using UI Kit
  • Add margin-top to textbox
  • What is the correct semantic HTML markup for a title (book, movie, etc.), according to the spec? Is it an <em> tag
  • How to make an animation in Geoserver or in Leaflet
  • Buttons overlapping when shrinking window
  • Stretch an element to the end of the automatically calculated grid, not just the explicit grid
  • What relation is there between Angular's <ng-content> and ShadowDOM
  • CSS background for div element is not working
  • CSS Marquee: multiple paragraphs overlaps
  • I want to align search bar to extreme right
  • Getting blank white space to the left of content inside pre tags
  • My viewer.html won't load any css and jss files
  • How to apply multiple styles to HTML to only part of a title?
  • Want to make text div transparent on a parallax area
  • Is there a way to make this ID plus descendants CSS rule less specific?
  • Is there a way to drop in a stylesheet to get a Material theme or similar for all form elements on the page?
  • How do I make a sideways L look in html/css?
  • Why won't the color #e67d22e1 display in Safari?
  • How to select specific tag's attribute value with xPath?
  • How to make div rows fill available height
  • How to fix text inside a block that grows
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com