CSS&JS/👀Study from Copying

[CSS] linear-gradient와 mask를 이용한 점박이 무늬(패턴) 배경

arancia_ 2025. 9. 18. 09:20

예시 사이트 : https://examples.motion.dev/react/scroll-linked 

 

Scroll-linked animations

An example of linking an animation to scroll using Motion for React's useScroll hook. View and copy the source code, learn which APIs are used and read the documentation.

examples.motion.dev

header {
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background-image:radial-gradient(transparent 1px, #0b1012 1px);
    background-size:4px 4px;
    backdrop-filter:blur(8px);
    mask:linear-gradient(#000 calc(100% - 40px), #0000);
}