正在加载视频...

视频加载失败

Design Engineering Tip: Separate the object from its shadow. When an element lifts away from a surface, the shadow doesn't always need to move with it. Keeping the shadow grounded and fading it based on distance can create a stronger sense of depth and physicality. Used carefully, this can...

68,018 次观看 • 2 个月前 •via X (Twitter)

0 条评论

暂无评论

原始帖子的评论将显示在这里

相关视频

CSS Tip! 🐳 You can add little details like this scale down on scroll effect with scroll-driven animations and some sticky positioning 🤙 section { animation: scale-down; animation-timeline: view(); animation-range: exit; } @​keyframes scale-down { to { scale 0.8; } ] In this smaller example, you can lean into using the position to drive an animation that scales itself down as it leaves the viewport (Seen on the Apple Vision Pro site 🍏) The nice thing here is that if you don't have scroll-driven animations, the user still gets a good experience ✨ So how do you do it? There isn't much to it header { transform-origin: 50% 0%; animation: scale-down both ease-in; animation-timeline: view(); animation-range: exit; view-timeline: --header; } @​keyframes scale-down { to { scale: 0.8 0.8; } } That's it. The layout makes use of position: sticky so that the element stays in the shot whilst you scroll the page. As it leaves the page, it scales down inside the 🫶 The other smol animation here is fading the overlay on the video out 😎 Real easy. You may notice the view-timeline you defined above for the 👀 header { view-timeline: --header; } You have a pseudoelement on the text content of the header that lives inside a header > section::before { background: hsl(0 0% 0% / 0.75); opacity: 1; animation: fade both linear; animation-timeline: --header; animation-range: exit-crossing 0% exit 0%; } @​keyframes fade { to { opacity: 0; } } You use a slightly smaller range on this with exit-crossing to fade it out before you start the scale down animation 🤏 That's it! Thought this smaller example would be easier to grok for people 🙏 It's also covered with JavaScript if you really want it for your sites 🤙 CodePen.IO link below 👇

jhey ʕ•ᴥ•ʔ

146,270 次观看 • 2 年前

Russian shadow fleet not just allows Russia to earn money for its war on Ukraine but is also an environmental catastrophe waiting to happen. In a September video by Yle. fi, experts explain that about 70% of the tankers used in the Russian shadow fleet are at least 15 years old. They do not go through proper servicing which increases the risk of technical issues and malfunctions. A lot of these vessels have been blacklisted in the first place because their condition is so bad (meaning they are not allowed to sail) but they still continue voyaging through the Gulf of Finland, for example. Many of them sail under the jurisdictions of different countries, which makes them harder to track. The risk of an oil spill is getting more and more likely - and the shadow vessels carry tens of thousands tons of oil. The environmental disaster that would follow would have an unprecedented scale. It will affect all forms of wildlife and sea life, destroy the business of fishermen and coastal tourism for years, if not decades. Its aftermath for the environment would be indescribable, and the costs to mitigate such a disaster will be exorbitant. Since Russian shadow fleet tankers mostly don't have proper insurance, there is very little chance that any payments will follow that will cover the costs. These expenses will have to be borne by the country/countries near which this will happen, combined with future economic losses caused by damage to the environment. Moreover, Russian shadow fleet tankers are an extra burden for the coast guards as they have to check more vessels (again, many of them are in very poor condition) and have extra training, working on scenarios of possible environmental disasters. According to experts quoted by Yle. fi, from January 2022 to August 2024, 380 million tons of Russian oil and other petroleum products went through the Gulf of Finland, earning Russia more than $220 billion for the war in Ukraine. It is obvious at this point that tackling Russian shadow fleet and cutting off or substantially decreasing Russian oil profits is a top priority towards ending the war and ensuring lasting peace. However, as with almost everything in this war, stopping Russia is also very important for the environment - globally and locally. Currently, this fleet is a ticking bomb that can explode tens of thousand of oil into water at any moment.

Anton Gerashchenko

198,984 次观看 • 1 年前

CSS Tip! 🎠 You can create a responsive infinite marquee animation with container queries and no duplicate items 🤙 li{ animation: slide; } @​keyframes slide { to { translate: 0% calc(var(--i) * -100%);}} The trick is animating the items, not the list 😎 More tricks 👇 To get this one working, you need to animate the items and not the list (Watch the video first?). Each item needs to know its row index (--i) in the list and the parent needs to know how many rows are in the list: ul { --count: 12; } li:nth-of-type(1), li:nth-of-type(2) { --i: 0; } li:nth-of-type(3), li:nth-of-type(4) { --i: 1; } Once you have that, translate each item based on its row index in the list li { translate: 0% calc((var(--count) - var(--i)) * 100%); } Now for the animation. The key here is that each row has an animation-delay calculated from its index (--i). That number is offset to make it negative so the animation start is offset ✨ ul { --duration: 10s; } li { --delay: calc((var(--duration) / var(--count)) * (var(--i) - 8)); animation: slide var(--duration) var(--delay) infinite linear; } Make sure to wrap that animation in: @​media (prefers-reduced-motion: no-preference) { ... } Lastly, the fun parts! 🤓 To create the "vignette" mask. Use a layered mask on the container 😷 .scene { --buff: 3rem; height: 100%; width: 100%; mask: linear-gradient(transparent, white var(--buff) calc(100% - var(--buff)), transparent), linear-gradient(90deg, transparent, white var(--buff) calc(100% - var(--buff)), transparent); mask-composite: intersect; } To create the 3D skewed effect, use a chained transform (Try toggling it in the demo ⚡️): .grid { transform: rotateX(20deg) rotateZ(-20deg) skewX(20deg); } As for the responsive part, use container queries! 🔥 article { container-type: inline-size; } When the article (card) is narrower than 400px update the grid and animation settings 🤙 Double the rows means double the duration! @​container (width < 400px) { .grid { --count: 12; grid-template-columns: 1fr; } li:nth-of-type(1) { --i: 0; } li:nth-of-type(2) { --i: 1; } li:nth-of-type(3) { --i: 2; } li:nth-of-type(4) { --i: 3; } li { --duration: 20s; } } CSS has the magic to be able to update those animations at runtime based on your custom property values 😎 An added bonus in this demo is that it doesn't require any JavaScript at all, for any of it 🤯 We can use CSS :has() for those toggles that update the styles, even the theme toggle! 🫶 Any questions, let me know! Make sure to check out the video. Will do a walkthrough one to follow-up 🤙 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

542,234 次观看 • 2 年前

CSS Tip! 💫 You can create this responsive perspective warp animation with 3D CSS and container queries ✨ (Video reveals trick 👀) .warp { container-type: size; perspective: 100px; transform-style: preserve-3d; resize: both; overflow: hidden; } Couple of tricks in this one 🤓 The main idea is to create a tunnel (an open-ended cube). On each side of the tunnel, use linear-gradient to create the grid lines ✨ .side { background: linear-gradient(#​fff 0 1px, transparent 1px 5%) 50% 0 / 5% 5%, linear-gradient(90deg, #​fff 0 1px, transparent 1px 5%) 50% 50% / 5% 5%; } To position each side, you rotate on the x-axis by 90deg. Each side would become invisible at this point. So you give the scene perspective 😉 .warp__side--top { width: 100cqi; height: 100cqmax; transform-origin: 50% 0%; transform: rotateX(-90deg); } The cool part here is that you want to make each side the same height. But the container is responsive. So you can use a container query and make sure each side is 100cqmax tall 🫶 Then the "beams". Each side contains "beams". They have different colors, sizes, and positions, and move at different speeds ⚡️ We can control that through scoped custom properties. .beam { width: 5%; position: absolute; top: 0; left: calc(var(--x, 0) * 5%); aspect-ratio: 1 / 2; background: linear-gradient( hsl(var(--hue) 80% 60%), transparent ); translate: 0 100%; animation: warp calc(var(--speed, 0) * 1s) calc(var(--delay, 0) * -1s) infinite linear; } The magic here is though that a beam's animation is as basic as translating it from the top of the side to the bottom. And you can get that distance with a container query again 🔥 @​keyframes warp { 0% { translate: -50% 100cqmax; } 100% { translate: -50% -100%; } } And that is pretty much it! A cool warp animation effect using 3D CSS and container queries ⚡️ If you have any questions, let me know ᵔᴥᵔ CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

187,474 次观看 • 2 年前

consistency ≠ uniformity: for those who haven't lived through this era – we used to have beautiful, precision interfaces. now they're replaced by a design language that originated from the Apple Watch, with icons that only fit in squircles. but that's not even the point. the point is we used to design the whole stack – the technology, the concepts, the interfaces. when designers only care about superficial consistency, platforms lose their uniqueness. apple used to design systems. skeuomorphism wasn't just about leather textures – it was about teaching people new mental models. the trash can empties because you understand what a trash can does. aqua's lickable buttons and sheets had depth because the OS had layers you could understand. the old apple designed the whole stack – from metal to pixels to concepts. teams weren't just shipping features in the same box, they were building coherent platforms each with opinions about what computing should feel like for the medium. liquid glass is fine on a phone. but on macOS it's unusable – lack of precision, visual noise everywhere. this is what happens when UI language designed for fingers bleed into macOS. we went from interfaces designed for a 27" cinema display with a precise cursor to interfaces designed for a 1.5" screen you tap with one finger. the Mac is for creation and precision work. it needs information density. it needs chrome you can grab. it needs UI that gets out of your way but gives you power when you need it. instead we got padding and whitespace and translucent blurs optimized for touch targets nobody's touching. the squircle icon mandate is a symptom. when you force every icon into the same shape, you're saying "brand consistency" matters more than "each app icon needs to communicate its function instantly." we traded clarity for uniformity. we traded precise design for cross-platform sameness. consistency means your system has coherent rules within itself. uniformity means everything looks the same regardless of context. the hardware team still gets it – that macbook pro + M-series chips, chef's kiss. but software design feels like it's chasing fat fingers instead of remembering what people do on a Mac.

Ryo Lu

716,979 次观看 • 8 个月前

🎬Whimsical Reverie | Preview: White Night's Ballet >> Main Attribute: Cool 🩰Outfit Details [White Night's Ballet] can be evolved into the following outfits: [White Night's Ballet: Awakening] (Stage 1), [White Night's Ballet: Undercurrent] (Stage 2), and [White Night's Ballet: Flamewake] (Stage 3). Fully glow it up to obtain the [White Night's Ballet: First Glow] outfit. 🩰Outfit Ability [Spinning Reflections]: After using the ability, Nikki bursts through the shattered mirror and begins an elegant dance amid blooming shards of light, with her movement speed greatly increased. If approaching a wall, Nikki can slide over the wall's surface and continue moving seamlessly. Sliding continuously consumes energy. When energy is depleted, Nikki will exit the sliding state. Wall sliding consumes more energy. While sliding across a wall, Nikki can jump over obstacles. She can also enter the floating state to disengage from the wall. When using the ability during [Companion Journey], Nikki and her companion will have a special movement effect. After equipping the [Spinning Reflections] ability, Nikki can also summon the Lucent Mirror and Mirror Shadow and activate the Brightnight Mirror Realm. The Brightnight Mirror Realm can be placed on water, allowing Nikki to slide within it. Within the Brightnight Mirror Realm, select [Airy Dance] from the sidebar to switch movement posture. Approach and remain near a Mirror Shadow to light it up. Interact with the lit Mirror Shadow to change its outfit, check its styling, try on its outfit, or invite friends to try it on. Note: The ability [Spinning Reflections] cannot be used in uncleared dungeons. The Brightnight Mirror Realm cannot be placed in certain stages or in the Mira Crown Merit Arena. 🩰Resonance Rewards Based on your number of Resonance attempts in [Through Songbound Night], you can earn rewards such as [White Night's Ballet: Makeup], [Momo's Cloak: Night Dance], and [Ocean's Radiance Gift Box], which includes the item [Dance of Golden Days] and the dance move [Flourishing Steps]. The item [Dance of Golden Days] can be used to dance gracefully in the open world. The dance move [Flourishing Steps] can be used in Momo's Camera. 🩰Evolution Rewards Reaching Evolution Stage 1 unlocks the pose [Graceful Leap]. Reaching Evolution Stage 2 unlocks [Eternal Ballet] for Momo's Camera: Framed Moment, the item [Dance of Golden Days: Illusory Dance], and the dance move [Flourishing Steps: Illusory Dance]. The Illusory Dance version features new music, special effects, and spectacular moments. Reaching Evolution Stage 3 unlocks [The Final Dance: Makeup], a new idle animation, the poses [Lightfooted Dance], [Unfolding Elegance], and [Elegant Pirouette], plus enhanced special effects and alternative details for certain pieces. —— ➤ Infinity Nikki Version 2.8 Golden Dust launches globally on July 16 (UTC-7)! ➤ Download Now: ➤ Join us on Facebook Group: #InfinityNikki #GoldenDust #GoldenCity

Infinity Nikki

91,324 次观看 • 1 个月前

CSS Trick! 🤙 You can create gradient borders on translucent elements using mask-clip and mask-composite with a pseudo-element 🔥 .gradient-border::after { mask-clip: padding-box, border-box; mask-composite: intersect; mask: linear-gradient(transparent, transparent), linear-gradient(white, white); } It's the same "Transparent border trick" from before. But, now you apply it to a pseudo-element 😎 The trick is to create a pseudo-element with a gradient background and then mask it so we only see the part we want, the border ✨ mask-clip defines the area affected by a mask. Similar to how you can define background-size. Using padding-box and border-box constrains the two masks. mask-composite is the magic part ✨ It defines a compositing operation for stacked mask layers. Using intersect means that the parts that overlap get replaced. And this seems to work in all browsers 🙌 As for the rest of the styles... – Make sure you set pointer-events: none on the pseudo-element – Make sure it fills the parent element. You can use position: absolute and inset: 0 – Make sure the background fills the space including the border-width. You can use calc to achieve that: --bg-size: calc(100% + (2px * var(--border))); background: var(--gradient) center center / var(--bg-size) var(--bg-size); That's it! 🚀 Gradient borders on translucent elements. You can set all the backdrop-filter: blur() you like! 😅 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

269,847 次观看 • 2 年前

Gege talk about Megumi & Yuji The interaction between them & how he named Megumi Host:“Next is Megumi. He belongs to the Zenin family, one of the Three Great Clans, the Zenin bloodline , the type of character often described as a cool genius. Can you tell us about the origin of this character?” Gege:“Do you mean the origin of his name?” Host:(nods) Gege:“The origin of his name? it comes from shadow.’” Host:“it’s related to his ability?” Gege:“Yes. It was decided because he can use shadows.” Host:“He can summon shikigami from shadows, the Ten Shadows Technique. It’s a really unique shadow ability. At first, it was hard to read (hard to pronounce in Japanese ) so simply used the phonetic readings for their names” Gege: (laughs) Host:“So he’s in the role of a rival to the MC, a cold genius with black hair, a cool(distant )feeling. Jump has a lot of characters like that, like Sasuke.” Gege:“Yes, like Rukawa…” (Slam Dunk) Host:“Rukawa, Kageyama (Haikyuu), that kind.” Gege:“Yes, exactly.” Host:“But surprisingly, he doesn’t really clash with Itadori. Rather, the two are pretty relaxed around each other.” Gege:“Yes. I did think about that. Well, when it comes to the main character, I’m basically the strict type. From the beginning, I didn’t plan to write it with a gentle tone. At the juvenile detention center, the two of them did have one direct confrontation.”(fearsome womb arc) Host:“Ah, there was a big clash there.” Gege:“But in the end, both of them were still willing to entrust things to each other. So I felt there was no need to make them keep having conflicts little by little in their daily life.” Host:“So there’s no need to say things like ‘big idiot’ .” Gege:“Yes, because that’s not the type of character. Forcing them to argue would feel awkward, and artificially making them fight would feel off, so I didn’t push it.” Host:“They’re two people who can surprisingly coexist. Normally, when people have different hobbies and tastes, it can lead to arguments. But they’re able to accept each other, and that makes me feel very comfortable” Gege:“That’s great.”

五条悟

184,714 次观看 • 5 个月前

Elon Musk: You can't solve self-driving unless you have millions of cars on the road. “We are no longer compute-constrained for training. I checked in with the team, is there anything we could do to improve the pace of progress with respect to training and inference? And currently, that is not the limiting factor. In fact, the limiting factor right now is that the amount of miles between interventions is so long that it takes quite a while to figure out which version is better than the other version because none of them are requiring any interventions. You start getting to thousands of miles between interventions, you need 10,000 miles to get an intervention. The average person only drives about 10,000 miles in a year. If it's in an urban environment, the average speed is 20 mph. Our professional test drivers get pretty bored, frankly. They're like, okay, I drove all week and there was no intervention. The highlight of the week would be like, yes, an intervention, finally! It's getting to that point. So, this is where, actually, having a giant fleet is extremely important, because we can deploy a new FSD model and run it in shadow mode and see how well it performs, compare how the human drives the car versus the new self-driving build, and then, analyze that delta in shadow mode, like the shadow knows or doesn't know as the case may be, and then, be able to assess by getting billions of miles very quickly with the giant fleet. Basically, that data engine is incredibly helpful. Actually, it's not possible to solve the self-driving problem without having millions of vehicles on the road.” Tesla 2024 Annual Meeting

ELON CLIPS

2,723,510 次观看 • 1 年前