發表文章

目前顯示的是 4月, 2024的文章

10 steps to Create「Lil Yachty meme」AI generated Video (Viggle AI)

圖片
日本近期流行的「ライブ会場を沸る」或是稱為「フロアを沸かす」的迷音AI短片,是怎麼製作生成的?下面我們用英文和影片一步一步做,完全不用動腦。 操作步驟 steps: Enter to Viggle AI's Discord server (https://discord.gg/viggle). Select any of these rooms named "animate" and click to enter. Type "/" to bring up a list of commands. Select "animate" from the list of commands. Upload your image. motion_prompt: type "$lil_yachty_stage_entrance". background: select "From template" . finetune: select "On" . Hit Enter or click on the submit button to send the command. Wait for approximately 1 to 5 minutes for the AI animation to be generated. 沒畫面的話可能還是會不太清楚呢,沒關係,我直接把操作步驟拍成教學影片了,只要照著這些步驟做,連從沒接觸過AI的人都能成功產出一個成品: 教學影片 為什麼會紅到日本? 這個不斷被二創的影片其實來自美國歌手 Lil Yachty 在演唱會的一段影片: Lil Yachty with the HARDEST walk out EVER 。 在「Viggle AI」出現之後,就從歐美紅到日本去了。大多人使用的素材都是動漫人物、Vtuber、親友或自己。 Viggle AI 的官網有提供 許多 motion_prompt 指令 給想要玩的人使用,「$lil_yachty_stage_entrance」這個就是其中之一。目前使用他們的動畫生成功能還是免費的,之後

用color-scheme和light-dark()寫出更彈性的dark mode

圖片
dark mode 的CSS寫法一直以來都不是很方便,在偵測使用者作業系統是不是dark mode的時候,我們可以用prefers-color-scheme來另外寫一套CSS。現在多了另一種寫法 light-dark() 。 prefers-color-scheme prefers-color-scheme寫法如下,當然還有很多東西要考慮,例如border、hightlight…等等,但為了方便說明,只用文字和背景顏色舉例。 :root { --text-color: #333; --background-color: #eee; } @media (prefers-color-scheme: dark) { :root { --text-color: #efefef; --background-color: #222; } } 新的語法 light-dark() light-dark()可以搭配color-scheme使用達到自動偵測使用者作業系統是不是dark mode: :root { color-scheme: light dark; --text-color: light-dark(#333, #efefef); --background-color: light-dark(#eee, #222); } 除此之外,還可以用input讓使用者自己選擇要不要用dark mode: :root { /* 偵測使用者作業系統 */ &:has(input[name="scheme"][value="light dark"]:checked) { color-scheme: light dark; } /* 不用 dark mode */ &:has(input[name="scheme"][value="light"]:checked) { color-scheme: light; } /* 使用 dark mode */ &:has(input[name="scheme"][value="dark"]: