css-alpha-masking
यह क्या करती है
यह स्किल एजेंट को किसी तत्व के ऊपर, नीचे, बाएँ या दाएँ किनारे पर नरम फ़ेड के लिए तैयार CSS कोड देती है। यह उन वेब बनाने वालों के लिए है जिन्हें इमेज या पैनल अचानक कट जाने की बजाय चिकनी तरह घुलते दिखें।
कब इस्तेमाल करें
- ✓जब आप चाहते हैं कि कोई इमेज या पैनल अचानक खत्म होने की बजाय अपने किनारे पर फ़ेड हो।
- ✓जब स्क्रॉल होती पट्टी या टेक्स्ट क्षेत्र को ऊपर या नीचे नरम किनारे चाहिए।
- ✓जब Safari में भी काम करने वाला किनारा-फ़ेड चाहिए।
Skill का लिंक
https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/css-alpha-masking/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी फ़ोटो पट्टी के ऊपर और नीचे के किनारों को पृष्ठभूमि में नरमी से घुलने वाला बना दीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट एक CSS mask जोड़ता है, जिसका ग्रेडिएंट पारदर्शी से ठोस और फिर वापस पारदर्शी जाता है। इसमें मानक और Safari वाला दोनों संस्करण शामिल हैं, और फ़ेड की गहराई बदली जा सकती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
CSS Alpha Masking Skill
Workflow
- Confirm direction (horizontal or vertical) and fade stop percentages.
- Provide the inline CSS snippet and any needed class usage.
- Offer small tweaks only (direction, stop positions, colors).
Usage checklist
- Apply the mask styles directly on the element or in a CSS class.
- Always include both
mask-imageand-webkit-mask-imagefor Safari. - Ensure the element has visible content; masks reveal/hide alpha only.
Horizontal (left/right) fade
/* Add this inline CSS to any element */
mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
-webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
Vertical (top/bottom) fade
/* Add this inline CSS to any element */
mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
-webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
Customization knobs
- Direction:
to right,to left,to bottom,to top. - Fade depth: adjust
15%and85%stops. - Strength: change
transparenttorgba(0,0,0,0.2)for softer fades.
Common pitfalls
- Forgetting the
-webkit-mask-imagefallback in Safari. - Expecting masks to work on elements with
overflow: hiddenbut no visible content behind.
Questions to ask when specs are missing
- Which direction should the fade go?
- How wide should the fade edges be?
- Is this for images, text, or a container background?
अक्सर पूछे जाने वाले सवाल
CSS mask क्या है?
यह एक CSS सेटिंग है जो ग्रेडिएंट के आधार पर तत्व के हिस्से छिपाती है, ताकि तत्व कटने की बजाय फ़ेड होकर खत्म हो।
कोड की दो लाइनें क्यों हैं?
स्किल में Safari वाला संस्करण भी शामिल है, क्योंकि Safari में प्रभाव दिखाने के लिए उसकी ज़रूरत होती है।
फ़ेड क्यों नहीं दिख सकता?
स्किल बताती है कि तत्व में दिखने वाली सामग्री होनी चाहिए, क्योंकि mask पहले से मौजूद चीज़ को ही छिपाता या दिखाता है।
जानकारी
लेखक का मूल विवरण
Apply CSS alpha masking with linear-gradient for horizontal or vertical edge fades (mask-image and -webkit-mask-image). Use when asked for alpha masks, fade edges, or CSS mask gradients.
repo: MengTo/Skills
लोकप्रियता
- GitHub स्टार
- 7.2k
- रैंकिंग में स्थान
- #13418
- लाइसेंस
- MIT
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
3d-cloth-material
7.2kआपके एजेंट को Three.js में असली बुने हुए कपड़े जैसा दिखने वाला मटीरियल बनाने में मदद करती है, जिसमें धागों की बुनाई, हल्की चमक, प्राकृतिक सिलवटें, किनारे और सीवन हों।
3d-falling-leaves
7.2kआपके एजेंट को 3D दृश्य में असली लगने वाली गिरती पत्तियाँ जोड़ने देती है, जो लुढ़कती हैं, हवा के साथ बहती हैं और कैमरा हिलने पर दोबारा इस्तेमाल होती हैं।
3d-four-seasons
7.2kआपके एजेंट को 3D दृश्य में वसंत, गर्मी, शरद और सर्दी के रूप जोड़ने देती है, जिसमें हरियाली, रोशनी, आसमान और बर्फ़ बिना दृश्य दोबारा बनाए बदलते हैं।
3d-high-poly-models
7.2kआपके एजेंट को चिकने आकार और विश्वसनीय किनारों वाले विस्तृत 3D मॉडल बनाने देती है, और फिर वेब पर अच्छे चलने वाले हल्के संस्करण तैयार करती है।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।