Automatically translated.View original post

css transform

# CSS

# Tranform

# Web Site Writing Basics

CSS 2D Transform Functions is a function used in the transformation feature of CSS to change the shape of HTML elements in 2D such as rotate, scale, skew, and move (translate) without additional JavaScript. These functions allow us to create movement effects and change the appearance of objects on web pages easily.

2D Transform Function Example

Transform: Rotate (30deg);: Rotate the element to 30 degrees.

Transform: scale (2);: 2 times the element.

Transform: skew (30deg);: Incline element.

Transform: translate (50px, 100px);: Move the element to the right 50 pixels and down 100 pixels.

Usage

You can insert these codes into the CSS rules to apply to any desired HTML element.

Code

/ * CSS Transform implementation example * /

. My-element {

width: 100px;

Height: 100px;

Background-color: lightblue;

Transform: Rotate (45deg) scale (1.5); / * Rotate 45 degrees and expand 1.5 times * /

}

2025/9/6 Edited to

... Read moreนอกจากการใช้ CSS Transform 2D พื้นฐานแล้ว ผมยังทดลองใช้ฟีเจอร์นี้ร่วมกับ animation เพื่อสร้างเอฟเฟกต์แบบไดนามิกมากขึ้น เช่น การกำหนด css animation iteration count ที่ช่วยให้อนิเมชันวนซ้ำตามจำนวนครั้งที่ต้องการ ทำให้เว็บไซต์ดูน่าสนใจและโฟลว์ดีขึ้น ถ้าคุณสนใจด้านการออกแบบที่ใส่ใจใน accessibility (a11y) ฟังก์ชันพวกนี้ก็ใช้งานได้ดีโดยไม่มีปัญหากับ screen readers หรือการใช้งานผ่านคีย์บอร์ด เพราะเป็นการเปลี่ยนแปลงที่เกิดขึ้นบน visual element โดยไม่ทำให้โครงสร้าง DOM สับสน สำหรับนักพัฒนาเว็บมือใหม่ ผมแนะนำให้ทดลองใช้ CSS Transform ร่วมกับการจัดวาง layout ด้วย Flexbox หรือ Grid เพื่อสร้างหน้าเว็บที่ไม่เพียงดูสวยงาม แต่ยังตอบสนองความต้องการของผู้ใช้ได้อย่างเต็มที่ สุดท้าย ผมเองใช้หลักการเหล่านี้มาปรับปรุงงานจาก dopefolio ของผม ซึ่งช่วยให้ผลงานโดดเด่นและนำเสนอข้อมูลได้อย่างชัดเจนและสร้างสรรค์มากขึ้น การใช้ CSS transform เป็นเครื่องมือที่ทรงพลังสำหรับผู้ที่อยากเพิ่มลูกเล่นและความน่าสนใจให้กับหน้าเว็บอย่างมืออาชีพ

Related posts

A side-by-side comparison shows a person's 'Before' and 'After' transformation of their midsection, specifically addressing an 'apron belly.' The 'Before' image shows a fuller stomach, while the 'After' image displays a visibly flatter core, indicating successful core transformation.
Core workouts that transform my apron belly
I swear by these workouts! I have notice a huge change in how my apron belly used to be and how strong my core has been after 2 csections. You can do this at home !! Standing dumbbell march 3 sets of 10-15 (each leg) Lying knee raises 3 sets of 10-15 (with weight for extra burn) Bird do
Unicornliftzz

Unicornliftzz

1042 likes

✨ Transform your Body with a Simple Trick! ✨

✨ Transform your Body with a Simple Trick! ✨ No more impossible diets! Scientists have discovered a method to activate fat burning 3X faster, without drastic changes to your routine! ✅ Works while you sleep ✅ Tested and approved ✅ Quickly visible results 🔗 Click on the link in the bio an
Fitness Fusion

Fitness Fusion

2172 likes

A person is on a StairMaster, viewed from behind, with text overlay '10 mins of BURN For Big 🍑 & sexy Stomach Summer Glow Up Guide STAIR MASTER ROUTINES'. The image promotes StairMaster routines for glute and stomach transformation.
A text graphic outlining a 10-minute StairMaster Warmup routine with increasing levels (8 to 15) and duration, along with tips on consistency, avoiding handrail reliance, breathing control, and adjusting levels.
A text graphic detailing a 15-minute StairMaster Cool Down routine with varying levels (5 to 15) and duration, providing tips on maintaining consistent steps, not skipping cooldown, breathing, and level adjustment.
Transform Your 🍑 BOOTY & ABS 🔥 One Step at a Time🥵
✨Tips✨ 🩻Posture: Keep your back straight, core engaged, and avoid leaning on the handrails. 💧Hydration: Always stay hydrated, especially during intense workouts. Drink water before, during, and after your exercise. 🦶Foot Placement: Step evenly on each pedal, ensuring you’re using the full
Chalie_Baker

Chalie_Baker

8098 likes

A woman in athletic wear poses in a gym, with overlay text "how to become unrecognizable in 1 week" and the Lemon8 logo.
Four raw eggs in a pan, with overlay text detailing protein intake, healthy fats like avocado oil and egg yolks, and incorporating fruits/veggies for glowing skin.
A person's legs are visible with overlay text about changing music, environment, dropping negative people, and challenging oneself, alongside two music player interfaces.
TRANSFORM INTO YOUR BEST SELF IN 1 WEEK!
Are you ready to transform like never before? Give yourself one week and watch yourself glow… When you start incorporating these healthy habits into your life, you will start to notice positive vibes all around. I dare you to try this challenge - no joking around. Analyze the people around you who
Zazel Rosado

Zazel Rosado

2263 likes

A woman in black workout attire takes a mirror selfie in a gym, with text overlaying "TRANSFORM BOOTY BUILDER WORKOUT SWIPE". She is showcasing her glutes, inviting viewers to swipe for the workout details.
A woman in a white top and gray leggings performs Romanian Deadlifts (RDLs) with a barbell in a gym, demonstrating the first exercise of the glute workout.
A woman performs hip thrusts on a specialized machine with a heavily loaded barbell, illustrating the second exercise for glute development.
TRANSFORM YOUR GLUTES: Booty builder workout🍑
Grow & transform your glutes with these 5 exercises! If I had to pick the perfect glute workout for the gains, this would be it⬇️ 1. RDL’s (barbell or dumbbell) 3 x 8, 1 x 15 2. Hip thrusts 3 x 6-8, 1 x 12, 1 x 20* 3. Smith machine reverse lunges 3 x 10-12 per leg 4. Glute Medius Cable Ki
Sophia Cepero

Sophia Cepero

39 likes

Transform your Dumbbell Rows with these pro tips!✨
Transform your Dumbbell Rows with these pro tips! 🔥 📲 LINK IN BIO for more workouts and fitness tips! 1️⃣ Elevate your seat 2 levels for a deeper stretch. 2️⃣ Hold dumbbells slightly higher for better leverage. 3️⃣ Relax your traps to target your lats more effectively. 4️⃣ Scoop the dumbbe
Lily Rose🏋️‍♀️

Lily Rose🏋️‍♀️

236 likes

Training guide to transform your glutes🍑
How to train to grow & transform your glutes⬇️ The first thing to know is what exercises to do to achieve your goals. My top exercises for glute growth are -hip thrusts, glute bridges, RDL’s, squats, Bulgarian split squats, lunges, kickbacks, abductions, & glute focused back extensio
Sophia Cepero

Sophia Cepero

92 likes

A beige graphic titled 'DAILY TIPS 7 Golden Rules for a Happier Life' by MARKETERBABES. It features a large number 7 and three puzzle pieces, one with a heart, on a light background. Lemon8 branding is at the bottom.
A beige graphic listing seven golden rules for a happier, more fulfilled life, including making peace with the past and not comparing oneself to others. It's presented by MARKETERBABES on Lemon8.
A beige graphic with 'Thank You for the read!' and engagement prompts: 'Like it? Double-tap!', 'Tell us what do you think.', 'Helpful? Share with your friends.', and 'Save it for later.' It includes a megaphone icon and MARKETERBABES Lemon8 branding.
Ready to transform your mindset? 🪐
Embrace these powerful truths and watch your life change for the better. Remember, happiness starts from within. By making peace with your past, you free yourself to fully enjoy the present. Understanding that what others think of you is none of your business allows you to live authentically. Gi
Elyz | Creator

Elyz | Creator

2504 likes

Transform Your Bath into a Spa-Worthy Detox 🌸
Imagine stepping into a warm bath that soothes your mind, rejuvenates your skin, and detoxifies your body—all in one luxurious soak. This Forest Bathing Detox Bath is more than just a relaxing escape; it’s a health and beauty powerhouse. Infused with the grounding aromas of CBD botanicals, the nour
Ashlee Sunshine

Ashlee Sunshine

2864 likes

Transform Your Body & Achieve Your Goals
#weightlossandfatloss #fitnesslifestyle #fitnessjourneymotivation #fitnessjourney #fitnessjourney
Fitness IQ

Fitness IQ

25.5K likes

Ready to transform your core???
📌 this 🔥core routine for later #CapCut #abworkouts #coreworkouts #coreexercises #excercisesforwomen
Sharika McDuff

Sharika McDuff

372 likes

Transform your Body & Skin with Fruit!!!🫐🥝🍊
✨Glowing up✨ It’s not just about hitting the gym or having a killer workout routine, though that’s definitely a big part of it. To truly glow up, we need to focus on our health as a whole, and that means paying attention to our nutrition too. Yes, working out is amazing and can do wonders for yo
Chalie_Baker

Chalie_Baker

1291 likes

Glute Gains: Transform Your Workout✨
Glute Gains: Transform Your Workout #gluteworkout , #fitnessmotivation , #gymtok , #glutes , #workout #homeworkouts #womenworkout #athomeworkout l Dallas
FitLikeRosy

FitLikeRosy

63 likes

The image presents an hourglass workout routine with exercises for stomach, back (including bent over rows), butt, and legs, alongside active rest days and health tips. It features a woman in green workout attire, a juicer with green vegetables and limes, and a relaxed woman, all promoting a fitness and healthy lifestyle.
✨Transform your body and feel amazing✨
⏳ Hourglass Workout Routine 🌴 💖 **Stomach & Back (Mon-Fri):** - 40 bicycle crunches - 20 side crunches (each side) - 20 crunches - 40 mountain climbers - 20 plank twists - 30 sec plank 💖 **Butt & Legs (Mon, Wed, Fri):** - 50 weighted hip thrusts - 40 squats - 40 fire hydrants
Uhhmerika

Uhhmerika

487 likes

3 Pilates Core Moves That Transform
These aren’t just “ab” exercises—they’re powerhouse builders. If you’re craving deeper strength, better posture, and a true connection to your core… start here. 1. The Hundred – Wake up your deep stabilizers and ignite your breath-to-core connection. 2. The Roll-Up – Buil
Movewithlaurenj

Movewithlaurenj

93 likes

How I transform my friend bedroom😱😳
Small bedroom transformation 😳😱. My friend wanted a grey, white and black theme . guys did I deliver #bedroomtransformation #bedroomglowup #bedroommakeoverideas #bedroomideas #bedroomrenovation
Fitwithpoupee

Fitwithpoupee

3031 likes

3 Things that has helped me transform my body!
1. Increased my protein intake 2. Weights 3-4 times a weeks 3. 8-10k steps a day You want to eat enough protein for your goal weight in grams. Example you want to be 145, aim to eat 145 grams of protein and break it up into your meals. 145 divided by 3 or 4. That’s how much protein you sho
Lina 🩷

Lina 🩷

267 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

2 likes

The image displays a laptop and an open journal on a white bed, with the text "Your 3 months CHALLENGE TO GLOW UP Before 2025" overlaid, introducing a transformation challenge.
A person stands against a brick wall, while text boxes outline Month 1 of the challenge: Daily Journaling, Hydration Challenge, and Digital Detox.
A person stretches their arms, with text boxes detailing Month 2 of the challenge: Fitness Routine, Meal Prep, and Sleep Hygiene.
3 months to transform: start 2025 strong
Hello friends! 🍋 With the new year around the corner, I've been thinking about how we can start 2025 strong. I’m creating a “3-Month Transformation Challenge,” and I want to invite you to join me on this journey! Consistency is key! Create a daily routine that includes exercise, heal
Thamires Cottone | REALTOR

Thamires Cottone | REALTOR

1045 likes

Transform your body in 4 weeks full body
#homeworkout #hiit #hitworkout #fullbodyworkout #beginnerworkout
Julia | All Women & PP Trainer

Julia | All Women & PP Trainer

7532 likes

Transform Simple Glasses into Luxe Home Decor
#glassdecor #DIYonABudget #dollartree
Dazzling Designs By Denise

Dazzling Designs By Denise

4397 likes

Transform Your Leftovers into This DOPE Sandwich 🥪
Transform Your Leftovers into This DOPE Turnip Sandwich! 🥪✨ Got a fridge full of leftovers? No problem. Turn them into a masterpiece that’s packed with flavor and, of course, more turnips. Because life’s better with turnips, right? Let’s get to it! What You’ll Need for the Turnip Slices: &
Turnip Vegan

Turnip Vegan

1188 likes

Transform Your Body & Achieve Your Goals
#weightlossandfatloss #weightgoals #fitnesslifestyle #fitnessjourneymotivation #gymmotivation
Fitness IQ

Fitness IQ

3218 likes

A woman's body transformation is shown through two mirror selfies, with text "TRANSFORM your body at home SWIPE" indicating a fitness journey.
A woman performs a lunge exercise outdoors, holding pink dumbbells and wearing pink ankle weights, with "Lunges" text overlay.
A woman performs a squat exercise outdoors, holding pink dumbbells and wearing pink ankle weights, with "Squats" text overlay.
At home Pilates workout to TRANSFORM your body
If you’re looking to transform your body, you need to get series about training. This doesn’t always mean lifting heavy weights, but focusing on whole body exercises. For example, something like a squat not only works your legs and glutes, but also your core and upper body! One of my favorite ways
Sophia Cepero

Sophia Cepero

103 likes

Transform your core with Pilates at home
If you’re looking to lean out your core then look no further! This is a beginner-friendly deep core workout. One of the best ways to train your deep core through Pilates, so this is a Pilates-inspired workout. Details⬇️ Exercise 1: Bird dogs 2 x 12 per side Hold the extended position for 3 s
Sophia Cepero

Sophia Cepero

77 likes

Transform Your Body & Achieve Your Goals
#gymmotivation #weightlossandfatloss #weightgoals #fitnesslifestyle #fitnessjourney
Fitness IQ

Fitness IQ

1130 likes

A graphic titled "50+ BEST AI TOOLS TO REPLACE ENTIRE TEAMS" featuring a central robot surrounded by eight categories of AI tools: Image, Video, Idea & Research, Writing Tools, Chatbots, Code, Websites, and SEO, each listing various tools with their logos.
A numbered list titled "Image Tools" presenting 11 AI tools for image creation, including Midjourney, Stable Diffusion, and DALL-E 3.
A bulleted list titled "Image Tools" describing tools to elevate visual content creation, including Midjourney, Stable Diffusion, and DALL-E 3.
🤖 Ultimate AI Tools to Transform Your whole team
Ready to supercharge your productivity with AI? Here's a curated list of over 50 AI tools that can replace entire teams! 🌟 ---- 🖼️ Image Tools Elevate your visual content creation with these powerful tools: • Midjourney • Stable Diffusion • Flux • Leonardo AI • Designs.ai • DALL-
Valder

Valder

685 likes

A fit woman in athletic wear poses, illustrating the title "HOW TO IMPLEMENT Hyper Ketosis TO VISIBLY TRANSFORM YOUR BODY IN 1-2 WEEKS." The image encourages saving for later.
A woman sits at a cafe table with a green drink, while text defines Hyper Ketosis as a turbocharged keto diet with benefits like rapid fat loss and mental clarity.
A hand holds a plate of pasta, while text outlines "THE SUMMER TRANSFORMATION PLAN" with macro percentages, intermittent fasting schedule, and hydration tips for Hyper Ketosis.
How to use hyper ketosis and transform your body
Ready to go full Hyper Keto and sculpt your body this summer? 🌞 This next-level fat-burning plan takes keto to the extreme (in the best way) — think deep ketosis, max energy, and serious results. 💪 Save this post for a full meal plan & essential tips to stay in fat-burning mode 🔥 #HyperKeto
Callista Opal

Callista Opal

27 likes

A split image showing a "BEFORE" and "AFTER" comparison of a woman's body transformation, with text overlay "TRANSFORM Your Body HOW I TONED MY STOMACH!".
A white plate filled with fresh blackberries and sliced strawberries, with the text "Calorie deficit" overlaid, illustrating a healthy eating component.
A woman in black athletic wear performing a Pilates exercise on green turf, with one leg extended, against a black background, and the text "Pilates" overlaid.
Transform your body & tone your stomach
Over the past year I’ve toned my stomach up a lot! Before I had stubborn fat that wouldn’t go away & it seemed like the last place it stayed was my stomach. Here are 4 things I did to tone my stomach ⬇️ 1. Calorie deficit Ate in a slight calorie deficit! To lose fat, you have to eat in a
Sophia Cepero

Sophia Cepero

238 likes

A bright, sunlit room with a large window, sheer curtains, a green plant, and a rug on a wooden floor. The text 'JOYFUL HABITS' is prominently displayed, setting a positive tone for mood-boosting habits.
✨ 10 Mood-Boosting Habits to Transform Your Day ✨⁣
1. Embrace Nature: Find peace in green spaces. 🌳⁣ 2. Stay Active: Dance, hike, or yoga your way to happiness. 💃🚶‍♂️🧘‍♀️⁣ 3. Cultivate Gratitude: Reflect on the little joys. 📝❤️⁣ 4. Nourish Your Body: Eat balanced, feel balanced. 🍎🥗⁣ 5. Stay Hydrated: Sip your way to a better mood. 💧🍋⁣ 6. Prior
eva

eva

25 likes

Transform your body, transform your life!
Join my workout program link in my bio🤩 #Fitness #summerbod #Lemon8 #gymmotivation
Sophie Jane

Sophie Jane

171 likes

- Transform Your Everyday Routine🌷🧘‍♀️🗓️
• Yuka ~ Yuka is an app that scans food and cosmetic products to evaluate their health impact. It breaks down ingredients, showing users which are safe and which might be harmful, providing a score based on their nutritional value and health effects. — I started using Yuka to make better choi
Brooke˚₊‧♡ ‧₊˚

Brooke˚₊‧♡ ‧₊˚

292 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

3 likes

📚 3 Books to Transform Your Mindset & Gatherings!
Looking for books that shift your perspective and elevate your life? These three reads will help you host better, think freer, and embrace your best self. ✨ 🌟 The Art of Gathering – Host with Purpose 💡 Define the “why” behind your gathering. ⚡ Set the tone from the very first moment. 🚀 The Cour
Lam 🌎🪡📚⏲️

Lam 🌎🪡📚⏲️

653 likes

Cheesy Beef Stuffed Potato Pancakes 🥔✨ Transform
Cheesy Beef Stuffed Potato Pancakes 🥔✨ Transform your mealtime with our Cheesy Beef Stuffed Potato Pancakes! Crispy on the outside, bursting with juicy beef and melted cheese on the inside, these pancakes are not just a dish but a delightful experience. Perfect for a cozy family dinner or a fest
louiseditesenoya

louiseditesenoya

185 likes

✨💪Transform Your Future Self with ChatGPT 🌸✨
I told ChatGPT that I didn’t want to workout today and this is what it said: Prompt: Tell me something that will destroy me so much that it will make me exercise daily. 🌟 Think of exercise not as a chore 🥱 but as a way to claim back your body 💪 and health 🩺, one day at a time 🌅. Imagine a f
Maya

Maya

615 likes

A title slide for 'CSS ESSENTIALS Part 17 CSS TRANSFORMATIONS,' featuring 'Rotate, Scale, Skew, and More' with abstract colored squares on a dark blue background.
An explanation of 'What is CSS Transform?' showing a 'Before' square and a rotated 'After' square, illustrating how transforms change an element's appearance without affecting layout.
A slide detailing the 'rotate()' CSS transformation, showing an arrow rotating from 0° to 45°, with text explaining its function and uses for icons or hover effects.
Master the Magic of CSS Transformations!
#webdesigner #csstransform #womenintech #codewithaysha
Aysha

Aysha

5 likes

Get ready to transform your room
The lighting definitely enhanced my wall 😍 #roomtransformation #lighting #wallart #walllights
Arbeilla Nichole

Arbeilla Nichole

2736 likes

A woman in a black blazer and shorts holds black high heels in a hallway. Overlay text introduces "8 boundaries you can set without guilt - because protecting your peace is a form of self-respect, not selfishness."
A woman in a black blazer and shorts, wearing black high heels, poses in a hallway. Overlay text states: "I need time to think before I decide Pressure is not love. Take your space to make aligned choices."
A woman in a black blazer and shorts, holding black high heels, gestures in a hallway. Overlay text reads: "Please don't raise your voice at me. Disrespect isn't part of any healthy conversation. You can walk away from it."
8 boundaries that will transform you 🫶🍋
At some point, you have to stop apologizing for choosing you. Setting boundaries isn’t about being rude or distant — it’s about honoring your peace, protecting your energy, and showing up for yourself the way you do for everyone else. You don’t owe everyone access to you. You don’t have to say
@sheisaworkofart

@sheisaworkofart

123 likes

A woman in grey activewear takes a mirror selfie in a gym locker room, with a neon sign above reading "WINTER ARC SPLIT" and a reflection of a "PROTECT YOUR THINGS" sign.
A woman performs leg presses on a machine in a gym, with the text "MONDAY: GLUTES" overlaid, indicating a glute-focused workout.
A woman in black activewear and headphones performs bicep curls with dumbbells, with the text "TUESDAY: UPPER BODY" overlaid, illustrating an upper body workout.
What workouts I’m doing to transform by Dec 31
Here’s the workout split I’m following to have a transformation by the end of the year! I want to mostly focus on building my lower body while still including upper body work 2x per week. MON: Glutes, doing hip thrusts, squats, and kickbacks. TUES: Upper body, doing bench press, lateral ra
Catie Strong

Catie Strong

56 likes

how to MELT the weight off - transform your legs
here’s my leg routine that MELTS the weight off my legs and builds muscle at the same time! i’ve gone down 2 pants sizes already in 1.5 months! i actually have two leg days in my week, so here’s the glutes and hamstrings focused leg day routine! if youre brand new to the gym i recommend bodyweig
raenuh

raenuh

112 likes

These workouts literally transform my back!!!
#backworkouts #bodycare #Fitness #workoutroutine #gymlifestyle #summerbod #healthylifestyle2024
Looms

Looms

199 likes

TRANSFORM MY HIGHTOP CONVERSE WITH ME!!!! ✨💋🌸🫶
I spilt hot chocolate on them and kinda ruined them. I also somehow destroyed the entire bottom of the shoe. It came all the way undone. So I decided to fix them. 😭😭😭 #transformation #tiedye #converse #DIY
Hannah Skye 💕🦋🌸

Hannah Skye 💕🦋🌸

433 likes

See more