標籤:
明天就是4月1日愚人節了,也就是那個可適度開玩笑、整蠱的日子了。如果你想和那些要上網的朋友或同事開個極客式玩笑,那就來試試這個國外網友Wes Bos分享的 CSS 檔案吧。
一、開啟瀏覽器的 Custom.css 檔案
本文以 Chrome 為例(CSS 修改後立即生效),進入同事或朋友的電腦,按下面方式開啟 Custom.css 檔案
- Mac:~/Library/Application Support/Google/Chrome/Default/User StyleSheets/Custom.css
- Windows XP:系統硬碟:\Documents and Settings\使用者名稱\Local Settings\Application Data\Google\Chrome\User Data\Default\User StyleSheets\Custom.css(其他 Windows 系統類別似,在個人帳號中的找“應用資料” AppData……)
- Ubuntu (Chromium):~/.config/chromium/Default/User StyleSheets/Custom.css
二、在 Custom.css 檔案中添加相應CSS代碼
1. 網頁上下顛倒
| /* Turn every website upside down*/body { -webkit-transform: rotate(180deg);} |
2. 網頁旋轉
| /* Spin every Website*/ body { /*-webkit-animation: spin 5s linear infinite;*/} |
3. 網頁中所有圖片上下顛倒
| /* Flip all images upside down*/img { /*-webkit-transform: rotate(180deg);*/} |
4. 網頁中所有圖片都自轉
| /*Spin all images*/img { /*-webkit-animation: spin 1s linear infinite;*/} |
5. 網頁倒在地上了(請用內容超過多屏的網頁測試)
| /*Make every website fall over!*//*html, body {height: 100%;} html {-webkit-perspective: 1000;} body {-webkit-transform-origin: bottom center;-webkit-transform: rotateX(-90deg);-webkit-animation: fall 1.5s ease-in;}*/
|
巧用CSS檔案愚人節惡搞(轉)