CSS MCQ Set 15 - Animations, Transitions and Transforms

CSS MCQ Set 15 में CSS Animations, Transitions और Transforms पर आधारित 20 प्रश्न दिए गए हैं। इनमें transform, rotate, scale, skew, transition-duration, @keyframes, animation-iteration-count, animation-fill-mode और perspective जैसे परीक्षा-उपयोगी टॉपिक्स शामिल हैं। हर प्रश्न की सरल हिंदी व्याख्या के साथ अपनी तैयारी परखें और Web Designing में CSS एनीमेशन की समझ मजबूत करें।

बहुविकल्पीय प्रश्नों के लिए निर्देश
  1. हर प्रश्न को ध्यान से पढ़ें।
  2. चार विकल्पों में से एक सही उत्तर चुनें।
  3. सही उत्तर पर ✅ और गलत उत्तर पर ❌ का चिन्ह दिखाई देगा।
  4. गलत उत्तर मिलने पर आप दोबारा प्रयास कर सकते हैं।
  5. सभी प्रश्नों को हल करने के पश्चात् कृपया Show Score बटन पर क्लिक करें। उत्तीर्ण होने के लिए न्यूनतम अंक प्रतिशत 60% है।
  6. अपने स्कोर को सुधारने के लिए Try Again बटन का उपयोग करें।
CSS MCQ Set 15 CSS Animations Transitions and Transforms

CSS Animations, Transitions and Transforms MCQ – Set 15

1. CSS transform प्रॉपर्टी का मुख्य काम क्या है? (What is the main function of the CSS transform property?)

सही उत्तर : (B) किसी एलिमेंट को 2D या 3D स्पेस में रोटेट, स्केल, स्केव या ट्रांसलेट करना (Rotating, scaling, skewing, or translating an element in 2D or 3D space)

Explanation: transform प्रॉपर्टी एलिमेंट को घुमाने (rotate), छोटा-बड़ा करने (scale), तिरछा करने (skew) और खिसकाने (translate) का काम करती है। यहाँ 2D का अर्थ Two-Dimensional और 3D का अर्थ Three-Dimensional है। CSS का पूरा नाम Cascading Style Sheets है। टेक्स्ट का रंग color प्रॉपर्टी से बदलता है।

2. किसी एलिमेंट को horizontal axis (X-axis) पर खिसकाने के लिए कौन-सा फंक्शन सही है? (Which function is correct to move an element along the horizontal axis (X-axis)?)

सही उत्तर : (C) translateX()

Explanation: translateX() एलिमेंट को क्षैतिज (X-axis) दिशा में खिसकाता है, जैसे transform: translateX(50px);। translateY() ऊर्ध्वाधर दिशा में खिसकाता है, scaleX() चौड़ाई घटाता-बढ़ाता है और rotateX() X-axis के चारों ओर घुमाता है।

3. यदि transform: scale(2); लिखा जाए, तो एलिमेंट के आकार पर क्या असर होगा? (If transform: scale(2); is written, what will be the effect on the size of the element?)

सही उत्तर : (B) आकार दोगुना हो जाएगा (Size will become double)

Explanation: scale(2) एलिमेंट की चौड़ाई और ऊँचाई दोनों को 2 गुना कर देता है। scale(0.5) आकार को आधा कर देता है। घुमाने के लिए rotate() उपयोग होता है।

4. rotate() function में angle की कोण इकाई के रूप में सामान्यतः किसका उपयोग होता है? (Which angle unit is commonly used in the rotate() function?)

सही उत्तर : (C) deg

Explanation: rotate() में कोण सामान्यतः deg इकाई में लिखा जाता है, जैसे transform: rotate(45deg);। deg का पूरा नाम Degree है। px (Pixel), % और em लंबाई या माप की इकाइयाँ हैं, कोण की नहीं।

5. transform-origin प्रॉपर्टी का उपयोग किसलिए किया जाता है? (What is the transform-origin property used for?)

सही उत्तर : (A) ट्रांसफॉर्मेशन के केंद्र बिंदु को बदलने के लिए (To change the center point of transformation)

Explanation: transform-origin उस बिंदु को तय करती है जिसके सापेक्ष rotate, scale जैसे ट्रांसफॉर्म होते हैं। इसका डिफ़ॉल्ट मान center (50% 50%) है। जैसे transform-origin: top left; से एलिमेंट ऊपर-बाएँ कोने के चारों ओर घूमेगा। एनीमेशन की अवधि animation-duration से तय होती है।

6. किसी एलिमेंट को तिरछा (slant/tilt) करने के लिए कौन-सा ट्रांसफॉर्म फंक्शन प्रयोग होता है? (Which transform function is used to slant or tilt an element?)

सही उत्तर : (B) skew()

Explanation: skew() फ़ंक्शन एलिमेंट को तिरछा (Slanted) कर देता है, जैसे transform: skew(20deg);। matrix() कई ट्रांसफॉर्म को एक साथ लिखने का तरीका है, perspective() 3D में गहराई देता है और translate3d() 3D में एलिमेंट को खिसकाता है।

7. CSS transitions का मुख्य उद्देश्य क्या है? (What is the main purpose of CSS transitions?)

सही उत्तर : (A) दो CSS प्रॉपर्टी वैल्यूज के बीच स्मूथ बदलाव दिखाना (Showing a smooth change between two CSS property values)

Explanation: CSS Transition किसी प्रॉपर्टी के मान को एक स्थिति से दूसरी स्थिति तक धीरे-धीरे और स्मूथ तरीके से बदलता है, जैसे बटन का रंग हॉवर पर धीरे-धीरे बदलना। यह किसी ट्रिगर (जैसे :hover) पर चलता है। लगातार लूप में चलने का काम animation करता है।

8. CSS transition को शुरू करने के लिए आमतौर पर किस state या trigger का उपयोग होता है? (Which state or trigger is commonly used to start a CSS transition?)

सही उत्तर : (B) :hover

Explanation: :hover सबसे प्रचलित ट्रिगर है, क्योंकि माउस ऊपर ले जाने पर प्रॉपर्टी का मान बदलता है और Transition चल पड़ता है। इसके अलावा :focus, :active या किसी क्लास के बदलने से भी Transition शुरू हो सकता है। :first-child, :lang() और :not() सामान्यतः Transition के ट्रिगर के रूप में उपयोग नहीं होते।

9. transition को पूरा होने में लगने वाला समय किस प्रॉपर्टी से तय होता है? (Which property determines the time taken for a transition to complete?)

सही उत्तर : (C) transition-duration

Explanation: transition-duration तय करती है कि Transition पूरा होने में कितना समय लगेगा, जैसे transition-duration: 2s; (2 सेकंड)। transition-delay शुरू होने से पहले का इंतज़ार, transition-timing-function गति का स्वरूप और transition-property यह बताती है कि कौन-सी प्रॉपर्टी बदलेगी।

10. transition-timing-function: ease-in; का क्या अर्थ है? (What does transition-timing-function: ease-in; mean?)

सही उत्तर : (A) transition धीमी गति से शुरू होता है और अंत में तेज़ होता है (Transition starts slowly and speeds up at the end)

Explanation: ease-in में Transition धीमी गति से शुरू होता है और धीरे-धीरे तेज़ होता जाता है। linear पूरे समय एक समान गति देता है, और ease-out तेज़ शुरू होकर अंत में धीमा होता है। डिफ़ॉल्ट मान ease है।

11. transition शुरू होने से पहले इंतज़ार का समय सेट करने के लिए कौन-सी प्रॉपर्टी है? (Which property sets the waiting time before a transition starts?)

सही उत्तर : (B) transition-delay

Explanation: transition-delay Transition शुरू होने से पहले का इंतज़ार समय तय करती है, जैसे transition-delay: 1s;। animation-delay यही काम Keyframe Animation के लिए करती है, Transition के लिए नहीं।

12. सभी बदलने योग्य CSS properties पर transition लागू करने के लिए transition-property में क्या लिखा जाता है? (What is written in transition-property to apply a transition to all animatable CSS properties?)

सही उत्तर : (C) all

Explanation: transition-property: all; सभी बदलने योग्य (Animatable) प्रॉपर्टीज़ पर Transition लागू करता है। यही इसका डिफ़ॉल्ट मान भी है। none लिखने पर कोई Transition नहीं चलता, जबकि auto और both इस प्रॉपर्टी के मान्य मान नहीं हैं।

13. CSS keyframes को परिभाषित करने के लिए किस at-rule का उपयोग किया जाता है? (Which at-rule is used to define CSS keyframes?)

सही उत्तर : (C) @keyframes

Explanation: @keyframes at-rule एनीमेशन के विभिन्न चरणों की स्टाइल तय करता है, जैसे @keyframes slide { from { left: 0; } to { left: 100px; } }। @media स्क्रीन के अनुसार स्टाइल, @import दूसरी CSS फ़ाइल जोड़ने और @font-face कस्टम फ़ॉन्ट जोड़ने के लिए है।

14. @keyframes के भीतर animation की शुरुआत और अंत को किन keywords या percentages से दिखाया जा सकता है? (By which keywords or percentages can the start and end of an animation be represented inside @keyframes?)

सही उत्तर : (D) from / 0% और to / 100% (from / 0% and to / 100%)

Explanation: @keyframes में शुरुआत के लिए from (या 0%) और अंत के लिए to (या 100%) लिखा जाता है। बीच के चरणों के लिए 50% जैसे प्रतिशत उपयोग होते हैं। बाकी विकल्प मान्य Keyframe selectors नहीं हैं।

15. किसी animation को लगातार चलाते रहने के लिए animation-iteration-count की क्या value दी जाती है? (What value is given to animation-iteration-count to run an animation endlessly?)

सही उत्तर : (C) infinite

Explanation: animation-iteration-count: infinite; एनीमेशन को बिना रुके बार-बार चलाता है। डिफ़ॉल्ट मान 1 है, यानी एनीमेशन एक बार चलता है। forever, loop और auto मान्य मान नहीं हैं।

16. animation की दिशा (जैसे उल्टा या आगे-पीछे चलना) नियंत्रित करने के लिए कौन-सी property प्रयोग होती है? (Which property is used to control the direction of an animation, such as reverse or alternating?)

सही उत्तर : (A) animation-direction

Explanation: animation-direction एनीमेशन की दिशा तय करती है। इसके मान normal, reverse (उल्टा), alternate (आगे-पीछे) और alternate-reverse हैं। animation-name यह बताती है कि कौन-सा @keyframes उपयोग होगा।

17. एनीमेशन समाप्त होने के बाद एलिमेंट अंतिम keyframe की स्टाइल्स को बनाए रखे, इसके लिए animation-fill-mode की कौन-सी वैल्यू उपयुक्त है? (Which value of animation-fill-mode is appropriate so that the element retains the styles of the final keyframe after the animation ends?)

सही उत्तर : (B) forwards

Explanation: animation-fill-mode: forwards; एनीमेशन खत्म होने के बाद एलिमेंट को अंतिम Keyframe की स्टाइल में बनाए रखता है। backwards शुरू होने से पहले (Delay के दौरान) पहले Keyframe की स्टाइल लगाता है। normal और alternate animation-fill-mode के नहीं, animation-direction के मान हैं।

18. चलती हुई CSS एनिमेशन को रोकने या फिर से शुरू करने के लिए किस प्रॉपर्टी का इस्तेमाल होता है? (Which property is used to pause or resume a running CSS animation?)

सही उत्तर : (D) animation-play-state

Explanation: animation-play-state के मान paused (रोकना) और running (चलाना) हैं। जैसे div:hover { animation-play-state: paused; } से माउस ले जाने पर एनीमेशन रुक जाता है।

19. CSS transition और CSS animation के बीच एक मुख्य अंतर क्या है? (What is a key difference between CSS transition and CSS animation?)

सही उत्तर : (A) transition में @keyframes की जरूरत नहीं होती, जबकि keyframe animation में @keyframes जरूरी है (Transition does not require @keyframes, whereas keyframe animation requires @keyframes)

Explanation: Transition केवल दो स्थितियों (शुरू और अंत) के बीच बदलाव दिखाता है और किसी ट्रिगर पर चलता है। Animation में @keyframes से कई चरण तय किए जा सकते हैं, और वह बिना ट्रिगर के अपने आप भी चल सकता है, बार-बार दोहराया भी जा सकता है। दोनों में समय (Duration) दिया जा सकता है।

20. 3D transformations में गहराई लाने के लिए कौन-सी property का इस्तेमाल होता है? (What property is used to add depth to 3D transformations?)

सही उत्तर : (D) perspective

Explanation: perspective प्रॉपर्टी 3D एलिमेंट्स को गहराई का एहसास देती है, यानी दर्शक और एलिमेंट के बीच की दूरी तय करती है, जैसे perspective: 500px;। z-index एलिमेंट्स के ऊपर-नीचे के क्रम (Stacking order) के लिए है, और opacity पारदर्शिता तय करती है।

Post a Comment

Previous Post Next Post

Contact Form