Automatically translated.View original post

css animation+transform

# Web Site Writing Basics

# Tranform

# animation

# css

CSS Animation is a feature in CSS that allows you to create animations or changes of an element on a web page seamlessly and procedurally. It uses a set of commands called Keyframes to determine the state of the element and uses property animation to control how to play, move, change color, or resize the element without additional JavaScript.

The main components of CSS Animation

1. @ keyframes:

It is a set of commands used to define frames, or steps of the animation, specifying how the element changes state (such as position, color, size, transparency) over a specified period of time.

2. Animation Properties:

Used to determine which element @ keyframes to create and how to play. Important features include:

Animation-name: Define the name of the Keyframes to be adopted.

Animation-duration: Determine the total duration of one animation cycle (e.g. 2 seconds or 500 milliseconds).

animation-timing-function: Determine the acceleration rate or speed of state transition between frames (e.g. Linear, Ease).

Animation-delay: Define a delay period before the animation starts.

animation-iteration-count: Determine how many times the animation will repeat.

Animation-direction: Define the direction of animation play (e.g. play forward, backwards, alternating back and forth).

Animation-fill-mode: Determine whether the element will maintain the final state of the animation.

Benefits and advantages of CSS Animation

Create interesting:

Make the website more lively and interesting.

Performance:

It is lightweight and works well with the CPU, making the website load fast and efficient.

Easy to control:

You can create complex motion effects more easily compared to using JavaScripts.

No JavaScript required:

For most animation tasks, you can create with CSS alone.

CSS Animation is ideal for tasks such as Hover effects, highlighting text, creating slideshows, or moving components on web pages.

2025/9/9 Edited to

... Read moreถ้าคุณกำลังหา “css animations tutorial” แบบเริ่มจากศูนย์ ฉันแนะนำให้โฟกัส 2 อย่างก่อนเลย: 1) @keyframes และ 2) การใช้ transform ร่วมกับ animation เพราะ transform เป็นตัวที่ทำให้การเคลื่อนไหวลื่นมาก (ย้ายตำแหน่ง/ย่อ-ขยาย/หมุน) โดยไม่ต้องพึ่ง JavaScript ตัวอย่างที่ฉันชอบใช้ฝึกคือ “เด้งกลับไปสู่รูปแบบเดิม” (เหมือนยืดแล้วคืนตัว) ซึ่งทำได้ด้วย scale + timing-function แบบง่ายๆ: 1) สร้าง keyframes - 0%: scale(1) - 50%: scale(1.15) - 100%: scale(1) เพื่อให้กลับไปสู่รูปแบบเดิม 2) ผูกกับ element - ตั้ง animation-duration เช่น 600ms - ใช้ animation-timing-function: ease-in-out จะได้ความรู้สึกธรรมชาติ - ถ้าอยากให้ “วนเรียนตลอดไป” ก็ใส่ animation-iteration-count: infinite ทริคที่เจอว่าช่วยมาก: - ถ้าต้องการให้เริ่มช้าแล้วเร็ว หรือเร็วแล้วช้า ลองสลับ timing-function ระหว่าง ease, ease-in, ease-out, linear (เริ่มจาก ease-in-out ก่อน ปลอดภัยสุด) - ถ้าอยากให้มันสลับไปมาแบบไป-กลับ (เด้งกลับ) ใช้ animation-direction: alternate จะช่วยลดการเขียน keyframes ซ้ำ - ถ้าคุณอยากให้จบแล้วค้างที่เฟรมสุดท้าย (ไม่กลับ) ใช้ animation-fill-mode: forwards แต่ถ้าเป้าหมายคือ “กลับไปสู่รูปแบบเดิม” ให้ปล่อยค่า default หรือกำหนด keyframes ให้กลับมาที่ 100% เปรียบเทียบแบบคนทำเว็บ: “CSS animation” vs “Postman” หลายคนเสิร์ชคำว่า “postman vs css animations” แล้วงง เพราะมันคนละโลกกันเลย: Postman คือเครื่องมือทดสอบ API (ส่ง request/ดู response) ส่วน CSS Animations คือทำเอฟเฟกต์ภาพเคลื่อนไหวบนหน้าเว็บ ถ้าคุณกำลังทำเว็บแอปจริงๆ มักจะใช้ทั้งคู่ร่วมกัน: Postman ไว้เช็ค API และ CSS animation ไว้ทำให้ UI ดูไหลลื่น เช่น ปุ่มโหลด, skeleton, hover effect เสริมสำหรับคนออกแบบที่เจอคำว่า “Scale strokes & effects (Figma) checkbox” ถ้าคุณออกแบบใน Figma แล้ว export มาใช้บนเว็บ บางครั้งขนาดเส้น/เอฟเฟกต์อาจย่อ-ขยายตามการ scale ทำให้ตอนเอาไปทำ CSS transform: scale() แล้วความหนาดูไม่เท่าที่คิด ใน Figma จะมีตัวเลือก “Scale strokes & effects” เพื่อกำหนดว่าจะให้ stroke/เอฟเฟกต์ถูกสเกลไปด้วยไหม - ถ้าต้องการให้ไอคอน/เส้นคมเท่าเดิมตอนปรับขนาด อาจปิดไว้ - ถ้าต้องการให้ทุกอย่างโตไปพร้อมกัน เปิดไว้ สุดท้าย ถ้าจะทำแอนิเมชันให้ลื่นจริงๆ ฉันจะพยายามใช้ transform และ opacity เป็นหลัก (เช่น translate/scale/rotate + fade) เพราะมักทำงานได้ดีและไม่หน่วง ช่วยให้เว็บดูโปรขึ้นแบบง่ายมาก

Related posts

A desk setup with a computer screen displaying the Khan Academy website, showing course categories like 'Careers' and 'Computer programming'. A pink lululemon water bottle is on the right. Text overlay reads 'how to learn for free' and 'SWIPE TO VIEW'.
A webpage for grow.google.com, asking 'What would you like to learn?' with options for career and business growth. It highlights free courses and certifications, providing tools and resources for skill development and career advancement.
A webpage for Khan Academy, titled 'My courses', showing various learning paths including 'Careers', 'Computer programming - JavaScript and the web', and 'Intro to computer science - Python'. It describes Khan Academy as a free resource for diverse subjects.
learn for free with these websites 🎀
‧°𐐪♡𐑂°‧₊ ⛄️ Learning new knowledge or skills can be completely free using these websites! It’s a great way to spend your free time ✨ Open University & Khan Academy is perfect for students wanting to enhance knowledge of content they already know to study, go ahead of content or learn knowl
peachiesuga ♡

peachiesuga ♡

6690 likes

My Programming Interest Just Skyrocketed! 🚀
I just discovered something that has made my interest in programming explode to 1000000000000000%! 🤯 🎮 Learning Programming is Like a Game Adventure! From Python, Java, JavaScript, to HTML, there are all kinds of programming languages available, along with systematic topic courses. The learning p
Valder

Valder

2173 likes

A young woman with long dark hair, wearing a pink satin shirt, smiles at the camera while sitting at a table. Overlay text reads: 'Tools and sites I use as a cybersecurity student to progress my skills and keep me interested in studying'.
A screenshot of 'The Hacker News' website, displaying various cybersecurity news articles from January 2025, including topics like vulnerabilities, malware, cyber espionage, and AI jailbreak methods. An ad for Zscaler and a banner for CIS Hardened Images are also visible.
A screenshot of the O'Reilly learning platform, showing various books and expert playlists related to AI, engineering, and data. Overlay text highlights the subscription cost ($50/month or $499/year) and its value for accessing books and live events.
Tools and sites I use as a cybersecurity student 🌸
#cybersecuritystudent #cybersecurity #techgirlie
LexiStudies

LexiStudies

116 likes

Fun coding games!
#lemon8diarychallenge
ピンクの曼珠沙華

ピンクの曼珠沙華

32 likes

Anatomy & Physiology Notes 📝
Happy Studying! #anatomyandphysiology #stealmynotes #study #biology #nursingschool
Emily Turner

Emily Turner

1883 likes

A woman with long brown hair smiles at the camera, with text overlayed that reads '9 Ways To Make Money With AI' and a white arrow pointing to the right.
Text 'Create Digital Products' above images of various digital product bundles like MRR & PLR guides and ebooks, with average earnings listed below.
Text 'Travel Planning' above a screenshot of 'Wonderplan' AI Trip Planner, which crafts itineraries, with average earnings listed below.
9 Ways To Make Money With AI
It’s actually insane how many ways you can make money with AI. I’m putting together an entire PDF download, but in the meantime, here are my 9 favorites. ✅ Digital Products ✅ Travel Planning ✅ Resume Writing Services ✅ Code Apps ✅ Sell AI Prompts ✅ Research Services ✅ Setup Automation Wo
halle 💰🫶🏼

halle 💰🫶🏼

240 likes

Morning study vlog + FREE templates & icons 🥹
Study with me vlog in early morning. ✨ In this vlog, I share you a free source to get FREE School’s templates such as timetables , planners, habit trackers and resume. They’re mostly free, so just go to “Freepik.com” to get them. Besides, you also download some FREE icons or pictures. Especiall
studywithemmane

studywithemmane

848 likes

BOOST Your Career: 4 FREE Online Courses for You
Are you wanting to up your resume and LinkedIn profile? There are so many ways to go about it, but free courses can really help! Here are a few sites with free courses to take. Harvard + EdX Price: Free Course Topics: Computer Science, Programming with Python, Artificial Intelligence with Pyth
Itsleilahclaire

Itsleilahclaire

1732 likes

An overhead view of IT bootcamp prep items including a laptop, binder, headphones, notebooks, sticky notes, and pens, with text 'IT Bootcamp Prep CODING + CYBER SECURITY'.
A laptop displaying an 'Intro to HTML' course page, accompanied by a mouse, highlighting the computing setup for the bootcamp.
Packages of assorted gel pens and colorful dual-tip markers, essential writing tools for studying and note-taking.
Coding + Cyber Security Bootcamp Prep
HEY GWRLS🎀 I have officially enrolled into IT Bootcamps *screaming insideee* (Coding + Cyber Security to be specific).. I’ve been thinking of going into the IT field for over a year now + I finally took the brakes off and I’m fully committed! This is super exciting for me because I was that
Ohmyguillen

Ohmyguillen

80 likes

CSS Cheat Sheet
Essential CSS tricks every developer needs! 🔥 Save this for your next project - covers flexbox, grid, animations, and responsive design in one handy reference. Perfect for beginners and pros alike! 💻✨ #CSS #WebDevelopment #Coding #Programming #Developer
EM

EM

4 likes

Resumé checklist: do NOT miss these! 📝
This may seem like basic advice, but I get a lot of DMs asking me to help review resumes and you’d be surprised how many people miss these key points! Keeping your resume updated is essential for reflecting your most recent skills, experiences, and achievements. Regular updates keep you in the r
Jane 🦧

Jane 🦧

85 likes

A black background with white text stating YouTube is free education, but 99% don't know the best spots. It introduces top channels to accelerate learning, with social media engagement metrics.
Details about MIT OpenCourseWare, offering free MIT courses covering the entire curriculum with syllabus, materials, and assignments for self-paced learning. Includes a YouTube channel link.
Information about Andrew Huberman, Ph.D., a Stanford Neurobiology Professor, providing lessons on brain health, focus, motivation, sleep, learning, and dreaming. Includes a YouTube channel link.
#Motivation
Daniel

Daniel

6 likes

Roadmap to Becoming a Frontend Developer
Want to break into frontend development but don’t know where to start? 🤔 This step-by-step roadmap will guide you from beginner to job-ready frontend developer! #codingforbeginners #htmlcssforbeginners #programming #studymotivations #softwareengineer
Aysha

Aysha

52 likes

Want to write for animation? Then you need these resources! . . . Let me know your favorite resources in the comments! . . . #screenwriting #screenwritersoftiktok #animation #animatorsoftiktok
Figisisters

Figisisters

13 likes

Powerful Websites
#fyplemon8 # #fypシ #websites #fy #websiteideas
Tha Smoke Websites

Tha Smoke Websites

238 likes

A black handheld gaming console, identified as a Steam Deck, is shown inside its open black carrying case, resting on a patterned blanket. White lines and text overlay read "My steam deck."
A close-up of the Steam Deck screen displays the Steam OS interface with various game tiles. Text overlays indicate its suitability for "casual gaming, emulation" and comment on "Battery life sucks tho."
The Steam Deck screen shows a customization menu with options like "Decky," "Animation Changer," and "CSS Loader." Text overlay states "What I use for customization," with an arrow pointing to the menu.
My steam deck
Part 2 of my handhelds! I’ve had this for about a month now and have been really enjoying it, it surprises me all the time at the capabilities of this console! #steamdeck #handheldgaming #psvita
Mandi B

Mandi B

63 likes

Stunning Hover Border Effects with Animations!
#webdesign #cssanimation #creativecoding #frontenddevelopment #techcontent
Aysha

Aysha

2 likes

A dark blue background with the title 'CSS KNOWLEDGE TEST!' and a purple lightbulb icon. Text asks 'How many can you get right? comment your score below!' with a Lemon8 logo and username.
A dark blue background with a white box containing 'Q1: What does the CSS property justify-content: space-between; do?' and four multiple-choice options (A-D).
A dark blue background with a white box containing 'Q2: Which unit is relative to the parent element's font size?' and four multiple-choice options (A-D).
💡 Think you know CSS? Let’s find out!
💡 Think you know CSS? Let’s find out! Take this short quiz and see how many you get right 😎 Comment your score below 👇 #CodeWithAysha #CSSQuiz #LearnToCode
Aysha

Aysha

3 likes

A customized Steam Deck with a pink and white floral skin, a bunny joystick cap, and a pink-themed interface, next to a white mechanical keyboard. The image highlights plugins used for Steam Deck customization.
A close-up of a customized Steam Deck displaying the Decky plugin menu, showing options like CSS Loader, SteamGridDB, and PowerTools. The text explains Decky Loader as a plugin launcher.
A list of favorite Steam Deck plugins, including PowerTools, CSS Loader, Audio Loader, Animation Changer, SteamGrid DB, and VibrantDeck, presented over a blurred background of a customized Steam Deck.
My Favorite Steam Deck Plugins!
One of my favorite things about the steam deck is all the customization options and the best part it’s super easy to do! With just a few downloads you can alter your Steam Deck’s wallpaper, startup & sleep screen, and so much more! Sharing some of my favorite Steam Deck plugins: Deckylo
doms.cozyspot

doms.cozyspot

416 likes

A laptop, a Starbucks drink, and a muffin on a wooden table, with the overlaid text "5 WEBSITES TO LEARN PROGRAMMING FOR BEGINNERS".
A MacBook Air displaying the FreeCodeCamp website, which offers free coding lessons and certifications. The text "FREECODECAMP" with an arrow points to the screen.
A MacBook Air showing the Codecademy website, featuring its basic, plus, and pro pricing plans. The text "CODECADEMY" with an arrow points to the screen.
Learn programming for free 👩‍💻
1. FreeCodeCamp - Languages: JavaScript, Python, SQL, HTML/CSS, and more. - Hands-on Projects: FreeCodeCamp is project-driven, meaning as you go through the curriculum, you'll build real-world applications like weather apps, portfolio websites, and data visualization projects. The full-
vedha | career tips (tech) 👩‍

vedha | career tips (tech) 👩‍

612 likes

A desk setup with a monitor displaying a SheCodes workshop on 'React States,' titled 'how i learned to code.' The image shows a keyboard, mouse, and speaker, with 'Upgrade your career' text, reflecting the user's coding journey with SheCodes.
How I learned to code
I enrolled in SheCodes last year and it has been the best decision that I have made regarding my career! 🌼I did their free class and I knew immediately I was a good fit. Starting out with basics I tested if my brain could work well with code and once I learned it did I moved on to the max progr
Realm of Comfort

Realm of Comfort

533 likes

Quick tutorial on how to isolate your lines or sketch and separate it from the background in clip studio. There’s actually a lot of ways, but this is how I’ve done it for years. lol #clipstudiopaint #art #drawing
Riven Harlow

Riven Harlow

28 likes

Come shopping with me at five below 💖✨
Transform your space without breaking the bank! 🍋✨ Discover budget-friendly decor at 5 Below that makes every room pop! #Lemon8Finds #RoomGoals Chicago
Shanti🙃🥰

Shanti🙃🥰

112 likes

I can’t be aloneeee
Bitesizemedia_

Bitesizemedia_

0 likes

The transform tool in Toonsquid is so goood #creatorsearchinsights #artvlog #sketch #toonsquid #ocart #animation
missink_toons

missink_toons

1 like

a conversation is happening..♥️📱 #etherealkra
Kra'

Kra'

1 like

“New” Planner
For one of my birthday gifts, my mom gave me this planner. I’m going to try it out for my personal planner. - I feel like it’s a lot going on with it and I really like simple planners 😅 Anyone else have this planner? #plannerideas #plannerinspiration #Lemon8Diary
👑💜

👑💜

225 likes

The cover image for a CSS Cheatsheet for Beginners, featuring the CSS3 logo and the text "Learn the most-used properties in one place!" on a dark blue background.
A CSS Cheatsheet section detailing properties for Background (color, image, repeat, position, size), Border (border, radius, top), and Outline (outline, offset) with example values.
A CSS Cheatsheet section outlining properties for Position (relative, top, left, z-index), Size & Dimension (width, height, max-width), and Float & Clear (float, clear) with example values.
CSS CHEATSHEET for Beginners
#css3cheatsheet #learncss #webdesignbasics #frontendtips #codingforbeginners
Aysha

Aysha

31 likes

Squish #meow #cat #squishy #kitty #animation
adrifoxx

adrifoxx

0 likes

A person is shown coding on a laptop with a tablet displaying an anime character nearby. The image features text overlays 'Level Up Your React.js Apps' and 'Using these 4 Frameworks and Libraries', indicating a guide for developers.
How I build amazing React.js Apps
Motion Formerly known as Framer Motion; A CSS Animation framework to easily add advanced animations to your JS and React applications. Headless UI Unstyled Tailwind components for React and Vue.js that integrate into Tailwind’s styling system while adding accessibility to components such as di
Karelle

Karelle

1 like

Did you know? #fyp #animation #usa #zackdfilms #tiktoklive
BEAUTIFUL LIFE 💐

BEAUTIFUL LIFE 💐

0 likes

A customized white Steam Deck with Hello Kitty and bear thumb grips displays a game carousel and a desert background. The image is titled "MY FAVORITE DECKY PLUGINS AND CSS LOADERS" with "DOWN BELOW" and an arrow, introducing the article's topic.
My Favorite Plugins
The first thing I did when I got my steam deck was customize it! But I realize I never posted what plugins and css loaders I used to customize. So here they are now! Plug ins: 1. Animation Changer (this allows you to change your boot up or shut down screen) 2. CSS Loader (this is how I customi
Larissa📖🎮

Larissa📖🎮

26 likes

See more