Automatically translated.View original post

css perspective+tranform

# Web Site Writing Basics

# perspective # Tranform

# CSS

CSS Perspective is a feature used to create a 3D space for elements on a web page, determining the distance of the audience from the object, making the elements that are transformed (such as rotation) appear as real as what our eyes see in real life, such as objects that are closer to looking larger than objects that are far away, and affecting the depth of the overall picture. The smaller the perspective, the larger and closer the object looks to our eyes, the clearer the 3D dimension.

Perspective working principle

Create a 3D space:

The perspective property will enable 3D space for the subelements being transformed.

Define spacing:

The value of the perspective is the distance from the user to the Z-plane where the object is.

Effect on vision:

Minor Value: Make an object appear larger when it is near, and it has a distinctive dimension.

Very valuable: The depth effect will look more delicate, the object will look flattened.

Application to Transform:

Perspective is often combined with other CSS features, such as transform: rotateY (), to create the illusion of rotating 3D objects.

Difference between perspective and transform: perspective ()

Perspective (features):

Use with the parent Element to create a 3D space together for all converted child Element.

Transform: perspective () (function):

Use directly with the Element to be converted to determine the depth of the object directly.

Example of use

Code

/ * Assign 3D space to container * / .container {perspective: 1000px; / * Define user spacing * /}

/ * Convert child element to rotate and dimensional * / .child-element {transform: rotateY (30deg); / * element rotation example * /

}

2025/9/8 Edited to

... Read moreถ้าคุณค้นหาเรื่อง “tailwind perspective” ส่วนใหญ่จะเจอคำถามคล้ายๆ กันคือ Tailwind มีคลาส perspective ไหม แล้วต้องวางไว้ที่ parent หรือใส่ที่ตัว element เลย ซึ่งแนวคิดมันเหมือน CSS ปกติเป๊ะๆ: “perspective” เป็นระยะมุมมองของผู้ชม เพื่อให้ transform แบบ 3 มิติดูมีความลึก (เช่น rotateY/rotateX แล้วเกิดความเอียงแบบ 3D) 1) วิธีคิดเวลาใช้ perspective + transform (ให้ไม่งง) - perspective = ระยะห่างสายตา ยิ่งค่าน้อย “ยิ่งดูลึก/ใกล้/บิดแรง” ยิ่งค่ามาก “ยิ่งดูแบน/เอฟเฟกต์เบา” - transform (เช่น rotateY, rotateX) = การหมุน/ขยับวัตถุในแกน 3 มิติ ดังนั้นถ้าคุณหมุนการ์ดด้วย rotateY แต่ไม่ได้ตั้ง perspective เลย มันมักจะดูเหมือนหมุนแบบแบนๆ ไม่ค่อยมีมิติ 2) Tailwind มี perspective ไหม? ต้องทำยังไง Tailwind (โดยเฉพาะเวอร์ชันใหม่) จะรองรับผ่าน utility ที่เกี่ยวกับ 3D มากขึ้น แต่ในหลายโปรเจกต์ “perspective” อาจยังไม่ได้มีค่าให้เลือกครบตามต้องการ วิธีที่ชัวร์และยืดหยุ่นสุดที่ฉันใช้บ่อยคือใช้ arbitrary value ของ Tailwind เช่น - ใส่ที่ parent: [perspective:1000px] แล้วค่อย transform ลูกด้านใน เช่น rotateY ตัวอย่างโครงสร้างที่เข้าใจง่าย (แนวคิด): - Parent: ตั้งมุมมอง 3D = perspective - Child: ทำเอฟเฟกต์หมุน = transform 3) ตัวอย่าง Tailwind ที่ใช้จริง (การ์ดเอียง 3D) สมมติทำการ์ดที่เอียงเล็กน้อยตอน hover: - Parent: class="[perspective:1000px]" - Child: class="transition-transform duration-300 [transform-style:preserve-3d] hover:[transform:rotateY(18deg)]" จุดสำคัญคือ perspective ต้องอยู่ “คอนเทนเนอร์” เพื่อให้ลูกข้างในเห็นความลึก และถ้าอยากให้ลูกย่อยซ้อนกันแบบ 3D จริงๆ ค่อยเพิ่ม transform-style: preserve-3d 4) ทำไมบางทีใส่แล้วไม่เกิด 3D? ฉันเคยติดอยู่ 3 จุดนี้บ่อยมาก: - ลืมใส่ perspective ที่ parent (หรือใส่ผิดตัว) - ใช้ rotate (2D) แทน rotateX/rotateY (3D) - ไม่ได้เปิดให้ element นั้น transform จริงๆ (เช่นไม่มี hover: หรือเขียนผิดไวยากรณ์) 5) เลือกค่า perspective เท่าไหร่ดี - ประมาณ 600px–1200px: กำลังสวย ใช้กับการ์ด/ภาพ/ปุ่ม - ต่ำกว่า 500px: มิติจะแรง เหมาะกับเอฟเฟกต์เด่นๆ - 1500px ขึ้นไป: จะดูนุ่มขึ้น เหมาะกับงานที่ไม่อยากให้บิดเยอะ สรุปสั้นๆ: ถ้าตั้งใจทำ css perspective ร่วมกับ transform ใน Tailwind ให้จำว่า “perspective ใส่ที่ parent” แล้ว “transform (rotateY/rotateX) ใส่ที่ลูก” คุณจะเห็นมิติ 3D ชัดขึ้นทันที และปรับความแรงได้ด้วยการเปลี่ยนค่า perspective ตามสไตล์งานของคุณ

Related posts

Choose the best perspective of yourself ❤️
#selflove #girladvice #confidence #confidencetips #confidentvibes
Kailey Anna

Kailey Anna

6922 likes

HER perspective of Let Me Down Slowly 💔
#letmedownslowly #alecbenjamin #fyp
Lindsey Jade

Lindsey Jade

2192 likes

Cat’s perspective 🥰
#dayinmylife
Elite MaineCoon Breeders

Elite MaineCoon Breeders

4481 likes

A book page from 'The Mountain Is You' with highlighted text discussing how rock bottom can be a turning point, leading to a declaration of change and a journey of self-awareness and growth.
A book page from 'The Mountain Is You' with highlighted text encouraging self-directed rage and determination to change one's life and not continue as one is, under the heading 'PREPARING FOR RADICAL CHANGE'.
The black cover of the book 'The Mountain Is You' by Brianna Wiest, featuring a gold mountain graphic and the subtitle 'TRANSFORMING SELF-SABOTAGE INTO SELF-MASTERY'.
This book changed my perspective on everything
Hey there, book lovers! 📚✨ Just dove into "The Mountain Is You" by Brianna Wiest, and it's a total game-changer! 🏔️💡 It's all about turning self-sabotage into self-mastery. If you're ready to conquer your inner mountains and unlock your potential, this one's a must-read. 🌟🧠
Jenna Weems

Jenna Weems

474 likes

Flower Shops from the girl’s perspective 💕
#flowershops #countrymusic #rewrite #girlsperspective #ernest
Emmy Moyen

Emmy Moyen

160 likes

A split image displays satellite views comparing Hurricane Katrina (Cat 3, 125 max winds, 400 miles diameter, 230 miles wind field) and Hurricane Helene (Cat 4, 140 max winds, 822 miles diameter, 370 miles wind field).
To better put it in perspective
#pray
💜 Samantha  )•¥|\|€R 💜

💜 Samantha )•¥|\|€R 💜

220 likes

A young woman in a sparkly silver top and black skirt takes a mirror selfie in a bathroom, smiling. Text overlay reads, "Today was the absolute best day ever."
A city skyline is visible through a window at sunrise, with orange and blue skies. The foreground shows a bed or couch. Text overlay says, "I got to see the sunrise..."
A young woman takes a selfie with an older woman, both smiling, standing next to a canal or river outdoors. Text overlay reads, "I got to give my mom a hug."
Perspective
#mindset #positivevibes #motivation
Faith Enokian

Faith Enokian

1059 likes

Perspective really is everything 💭
Instead of saying “ugh I have to wake up early for my workout,” I remind myself — I get to wake up, move my body, and have access to a gym… and why not have fun with it too? 🏋️‍♀️✨ Gratitude changes the whole vibe 🤍 #MindsetShift #WellnessJourney #GratitudeAttitude #HealthyMindset #
Sarina Agarwal

Sarina Agarwal

34 likes

Different perspective?
Wellness Habits 🧘 Habit 1: rise early 🧘 How It Helps Me: meditate, set intention, plan. All in peace and quiet (before the kiddos wake up) 🧘 Habit 2: write out my plan for the day 🧘 How It Helps Me: keeps me focused on my tasks, (even writing in when to take breaks) adhder life saving practice!
G A B Y

G A B Y

2 likes

A hand holds a book against a textured grey-green blanket, with the overlay text "this book CHANGED MY LIFE" in white boxes.
The worn black cover of the book "Go Ask Alice" by Anonymous, showing text about millions of copies sold and a companion diary, resting on a grey-green blanket.
An open book displays the first page of "Go Ask Alice," which states it's based on a fifteen-year-old drug user's diary, with an overlay "this is the first page!".
this book shifted my perspective 📚⭐️
📚 Title and Author: Go Ask Alice by Anonymous 🌟 Genre: Memoir 💬 Short Summary: She is a 15-year old girl and is served a drink laced with LSD and that begins her downward spiral with drugs. This is her diary and shows the genuine fear and thought process that she goes through while discoverin
ayersellie

ayersellie

1466 likes

It’s all about perspective ✨
This collage explores how perspective shapes experience. How the same world can feel different depending on where we place our attention. It reflects a grounded kind of optimism, choosing to notice what’s still good without denying what isn’t. #collageart #embracevulnerability #arttherapy
Sarah Montour

Sarah Montour

15 likes

A positive perspective on medical school
#medicalschool #medicalstudent #doctor #premed #premedstudent
Sonia | Doctorinthemaking

Sonia | Doctorinthemaking

27 likes

A planner page displays 10 handwritten relationship lessons, including 'Love should feel safe, Not stressful' and 'Actions speak Louder than Words'. A drawing of a flower with green leaves is at the bottom, with 'Lemon8' and '@speckled_red' watermarks.
Relationship Lessons That Changed My Perspective
These relationship lessons have completely shifted how I see love, boundaries, and self-worth
Speckled_Red

Speckled_Red

147 likes

Purple teeth for perspective
From drinking a minimum of bottle of wine a night while also binging throughout the week and weekends my face had become so swollen. Within a month the swelling had gone down! #sober #sobriety #wedorecover #smile #fypシ
Katie Garner

Katie Garner

536 likes

An interesting perspective on Black Africans
#selfhelpbooks #lemon8challenge My Current Read 📖 Name of the Book: Black Tax 📄 Plot: N/A 📖 Genre: Self Help 📄 My Favorite Quotes: "Though I drive in the valley of the shadow of death I fear no hijackers, but another fuel increase." 😂 💭 My Thoughts: hmm🤔? ⭐ Star Rating: 4.2
Anesu

Anesu

156 likes

it’s all about perspective 🫶🏽
i won’t lie, i teared up making this post. there are so many little things in this world i never show my gratitude towards. i am so lucky to be where i am. i am so grateful to here. this life is such a privilege 🥹❤️‍🩹. i could go on & on & on. please take the time & share some gr
hi! im reis 🤍

hi! im reis 🤍

16 likes

A motivational image titled 'Perspective is Everything' highlighted in yellow. It lists negative experiences like 'Discomfort,' 'Problems,' and 'Pain,' with arrows pointing to positive reframings such as 'Growth,' 'Challenges,' and 'Power.' The image promotes changing one's outlook on life's difficulties.
Perspective????
Whenever we have problems we always think of the worst however, what if we change the way we think. What if instead we change our negative thoughts with positivity. Just by doing that we can change our whole attitude and outlook on life. Which gives us a new perspective. If you change t
Lakesha

Lakesha

650 likes

That changed my perspective
#itgurl #selflove #selfimprovement #selfcare
J.Rubyy

J.Rubyy

1902 likes

Give me your perspective
Lmk ladies! And you men why do it? Haha lmk! #life #story #GirlsTalk #letstalkaboutit #unfiltered
Jocelyn<3

Jocelyn<3

7 likes

Perspective 🤍
#mindset #quotes #kindness #girlhood
Faith Enokian

Faith Enokian

163 likes

Lies Lies Lies from the girl’s perspective
This song is sooo good!! #morganwallen #lieslieslies #countrymusic
Emmy Moyen

Emmy Moyen

2992 likes

Shifting your perspective ✨
Your journey is yours ! Trust the timing and stop measuring it against someone else’s. Your life was not made for you go compare #growthjourney #mindfulness #lemon8creator #youtube #embracevulnerability
Dani ✨

Dani ✨

6 likes

Perspective 🌸
Sometimes we get so caught up in the details that we forget to step back and see the bigger picture. Trust the process, embrace the journey, and remember that every piece fits perfectly in time. #Perspective #BiggerPicture #MindsetMatters #GrowthJourney #TrustTheProcess #Inspiratio
Annie | 📚👗💄🪷

Annie | 📚👗💄🪷

6 likes

A handwritten list in a notebook titled 'Shift Your Perspective,' showing negative thoughts reframed with gratitude and faith, ending with a summary from 1 Thessalonians 5:18.
✨Shift your perspective✨
It’s time for us to shift our perspective towards our situations. God got us, draw near him and he’ll draw near to you! James 4:8 ✨Scriptures✨ 💕“Draw near to God and He will draw near to you. Cleanse your hands, you sinners; and purify your hearts, you double-minded.” ‭‭James‬ ‭4‬:‭8‬ ‭NKJV‬
Mykala Foster

Mykala Foster

402 likes

🫶Gratitude journal prompts to shift perspective
Shifting perspective through gratitude doesn't mean ignoring problems but rather training your mind to also see the good that coexists with challenges. These prompts help you develop a gratitude practice that goes deeper than surface-level thankfulness, revealing hidden blessings and reframing
FawnAndFern

FawnAndFern

67 likes

What if Call Out My Name was from her perspective?
[villain mode: activated] 😈 #theweeknd #calloutmyname #narcissist #lyrics #singing #rnb #mydearmelancholy
Lindsey Jade

Lindsey Jade

106 likes

Bible study on Perspective!
The Bible study of the day is on Perspective and how important it is to put a Godly perspective on everything! Key verses: -2 Corinthians 4:18 -Colossians 3:2 -Jeremiah 29:11 #bible reading 🥰 #fyp #fypシ゚viral #i love reading my bible #godlovesyou
Maddie_0415

Maddie_0415

6 likes

A person's midsection with hands forming a heart over a scar near the navel, wearing a brown bra. Overlay text reads, "DON'T RISK YOUR Life FOR A TAN," emphasizing sun protection awareness.
Melanoma changed my whole perspective
After being diagnosed with melanoma and having several scars on my body, I have become so diligent about sun protection and getting my glow in a safer, healthier way. I absolutely love having tan skin, but it’s definitely not worth risking my life over. I’ve tried countless tanning mousses and this
Briprov

Briprov

2016 likes

PERSPECTIVE
Proverbs 20:30 Sometimes it takes a painful experience to make us change our ways. #perspective United States
ALIGNEDFUTURE

ALIGNEDFUTURE

11 likes

Marry Me from the girl’s perspective!
#countrymusic #marryme #thomasrhett #rewrite #girlsperspective
Emmy Moyen

Emmy Moyen

258 likes

Change Your Perspective ✨🫶
If you can change your perspective you can change your mood! #motivation #inspiration
Daily Peptalks Tv

Daily Peptalks Tv

21 likes

A smiling young woman with blonde hair stands outdoors, wearing a light blue sweater and dark vest. The image has text overlay "A verse that has changed my perspective" and a "Swipe" indicator, suggesting more content.
A verse that has changed my perspective
Hebrews 4:15🤌🏼 I knew that Jesus walked this earth as a human but I never fully grasped that while He is divine, holy, and perfect, He was tempted. He felt the feelings I feel. He experienced normal, worldly things like we encounter every day. Jesus knows the hardships I am facing and the battle
Kacey🌿

Kacey🌿

249 likes

Perspective: Different views in life
Horizon in the middle - Looking straight ahead Horizon at the top - looking down at something Horizon at the bottom - looking up at something #art #drawing #learning #basics #traditionalart
SquigglyJoy

SquigglyJoy

7 likes

It's all about perspective 🫶🏻
#maturing #socialmedia #microinfluencer #confidencetips #confidence
Kylie R

Kylie R

231 likes

A blank white paper with a silver mechanical pencil rests on a blue drawing board. The text "DRAWING PERSPECTIVE IN BED" is overlaid in yellow, with a gray and red blanket in the background.
A white paper displays initial perspective lines converging to two vanishing points, with a basic building tower sketched. A "FOUR CANDIES 0.9" mechanical pencil lies on the drawing.
A detailed perspective drawing of a multi-story building with numerous windows and architectural features is shown on white paper, placed on a blue drawing board.
Drawing perspective in bed
Morning practice ⭐️Overall rating: /10: Art tips foryou #sketchingideas #unfiltered #viral #trending #art
Ira

Ira

14 likes

See more