This media is not supported in your browser
VIEW IN TELEGRAM
React-animations — это библиотека, основанная на анимациях из animate.css. Она легко осваивается и предлагает большое количество анимаций.
React-animations совместима с любыми inline-style библиотеками, которые поддерживают определение ключевых кадров анимации через объекты, такими как Radium, Aphrodite или styled-components.
Теперь давайте разберём, как это работает на примере анимации подпрыгивания.
const Bounce = styled.div`animation: 2s ${keyframes`${bounce}} infinite;
<Bounce><h1>Hello Animation Bounce</h1></Bounce>
import React, { Component } from 'react';
import styled, { keyframes } from 'styled-components';
import { bounce } from 'react-animations';
import './style.css';
const Bounce = styled.div`animation: 2s ${keyframes`${bounce}} infinite;
export default class ReactAnimations extends Component {
render() {
return (
<Bounce><h1>Hello Animation Bounce</h1></Bounce>
);
}
}
Анимация успешно работает, она проста и легко настраивается.
Для использования анимации при прокрутке можно воспользоваться отличным решением — библиотекой react-animate-on-scroll.
CodeBase | Frontend | #react
Please open Telegram to view this post
VIEW IN TELEGRAM
Bluefish — это многофункциональный редактор кода.
Обладает рядом полезных функций:
CodeBase | Frontend | #ide
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
CodeBase | Frontend | #animate
Please open Telegram to view this post
VIEW IN TELEGRAM
Выбор элементов на основе их содержимого с использованием псевдокласса :has() открывает возможности изменения стилей элементов в зависимости от наличия определенных дочерних элементов или других условий в их содержимом.
CodeBase | Frontend | #css
Please open Telegram to view this post
VIEW IN TELEGRAM
Тематика: IT, музыка
Страницы: многостраничный
CodeBase | Frontend | #figma
Please open Telegram to view this post
VIEW IN TELEGRAM
console.log('Первое сообщение');
setTimeout(() => {
console.log('Сообщение из setTimeout');
}, 0);
console.log('Второе сообщение');
setTimeout
, сообщения будут выведены в порядке:Первое сообщение
Второе сообщение
Сообщение из setTimeout
setTimeout
помещается в очередь и будет выполнен после завершения текущего кода в стеке вызовов. Event Loop позволяет выполнять асинхронные операции, сохраняя отзывчивость и эффективность веб-приложений.Если понравился пост, обязательно добавь
CodeBase | Frontend
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
Технологии: HTML, SCSS, TS
CodeBase | Frontend | #animate
Please open Telegram to view this post
VIEW IN TELEGRAM
CodeBase | Frontend | #ide
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
Технологии: HTML, SCSS, TS
CodeBase | Frontend | #animate
Please open Telegram to view this post
VIEW IN TELEGRAM
CodeBase | Frontend | #Stylus
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
Технологии: HTML, CSS
CodeBase | Frontend | #animate
Please open Telegram to view this post
VIEW IN TELEGRAM
CodeBase | Frontend | #tool
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
Технологии: SVG, SCSS, TypeScript
CodeBase | Frontend | #animate
Please open Telegram to view this post
VIEW IN TELEGRAM
CodeBase | Frontend | #tool
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
Технологии: SVG, CSS, JavaScript
CodeBase | Frontend | #animate
Please open Telegram to view this post
VIEW IN TELEGRAM