Relative Content

Tag Archive for csscss-animations

Rotate a triangle from top left or right sides in css

I want to rotate a triangle created with CSS from the top-left or top-right sides. For example, in the attached image, there are two cases of triangle rotation. In the first case, the triangle is rotated from the top-left, and in the second case, it’s rotated from the top-right. Is there a way to implement these rotations simply using CSS?

Box Collapsing page transition animation using CSS

I am trying to collapse a box using css animation. After the animation, I want to make the box disappear and then show my page. However, after the box collapses it reappear again. I tried setting the display to none but it still doesn’t work.

Animating hover – delay underline until hover animation finishes

I’m encountering an issue with implementing a hover effect on underlined links using SCSS. I’m aiming to create a transition where, on hover, the text color changes to red, and the underline disappears momentarily before being redrawn in red from left to right. When hover finishes first the red underline should dissapear and only then the original, black underline should appear again (without animation). The first step works, however, I’m having trouble ensuring that the transition from the hovered element finishes before the non-hovered element is displayed. I’ve tried experimenting with transition-delay but to no avail. You can see the issue in the following code – notice how black underline appears BEFORE the red line completely shrinks when hover ends (on mouse leave). Can you help?

How to apply translate one more time to a target that has already been translate

#cursor { position: absolute; width: 20px; height: 20px; border: 2px solid #000; box-sizing: border-box; transition: 0.1s; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; } #moon { position: absolute; width: 35px; height: 35px; border-radius: 50%; background-color: rgb(186, 186, 186); animation: rotate 3s linear infinite; } @keyframes rotate { 0% { transform: rotate(0deg) translateX(80px); } 100% { […]

CSS hover animation doesn’t finish once mouse leaves

I am making a webpage and wanted the title to do a ‘swing’ animation when the mouse hovers over it. The code works fine, but when the mouse stops hovering, it snaps back to its original position, instead of finishing the animation.