製作 noise effect 效果


Posted by mijouhsieh on 2025-03-29

方法、工具:
這支影片有快速簡單教學,裡面使用 photoshop 來做噪點。
但我使用這個噪點生成器,可以調整噪點透明度、噪點密度、噪點顏色、背景色或背景透明,再設定輸出的圖片大小(寬高皆440px 就有不錯效果了)。

step 1 : 生成噪點圖片

step 2 : 靜態直接使用圖片
實作是使用 React + Tailwind CSS,因為是測試做背景的噪點效果,所以用 background image

<div className="h-[100px] w-[300px]">
  <div className="animate-noiseEffect z-40 h-full w-full bg-[url('/src/assets/images/img-noise-blue.png')] bg-cover bg-center outline"></div>
</div>

step 3 : 動態加上 animation

//tailwind.config.js
export default {
    theme: {
      extend: {
        keyframes : {
            noiseEffect : {
              "0%" : {backgroundPosition: "0 0"},
              "100%" : {backgroundPosition: "100% 100%"}
            }
        },
        animation: {
          noiseEffect: "noiseEffect 1s steps(10) infinite"
        }
      },
    },
    plugins: [],
}

noise effect image
noise effect image blue


#noise effect







Related Posts

[Release Notes] 20210317_v1 - Support Insert img path and save button in post editor

[Release Notes] 20210317_v1 - Support Insert img path and save button in post editor

HTML CSS display

HTML CSS display

[SQL]Summing a column while ignoring duplicate records(row_number())

[SQL]Summing a column while ignoring duplicate records(row_number())


Comments