Advertisement
Guest User

偵探的甜甜圈投餵噗寶 v2

a guest
Jul 23rd, 2021
672
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.63 KB | None | 0 0
  1. /* 偵探的甜甜圈投餵噗寶 */
  2. /* 建議先 Ctrl+F 找出目前佈景裡把有用到 #dynamic_logo 和 #creature 相關的語法都刪掉 */
  3.  
  4. #dynamic_logo {
  5.   /* 噗寶圖片寬度 */
  6.   width: 300px;
  7.   /* 噗寶圖片高度 */
  8.   height: 300px;
  9.  
  10.   /* 將噗寶位置固定在視窗右下角最上層 */
  11.   position: fixed;
  12.   bottom: 10px;
  13.   right: 10px;
  14.   z-index: 1000;
  15.  
  16.   /* 為噗寶加上陰影 */
  17.   filter: drop-shadow(3px 3px 7px rgba(0, 0, 0, 0.3));
  18.  
  19.   /* 待機時噗寶圖片網址 */
  20.   background: url(https://images.plurk.com/2FLhMuNUGLfG52JDu0QN8F.gif) no-repeat center/contain;
  21.  
  22.   /* 點擊前游標圖片網址 (尺寸限制在 128x128 內,超過尺寸不會顯示) */
  23.   cursor: url(https://images.plurk.com/686x3vhW3AR6sxP6tnJDVr.png), auto;
  24. }
  25.  
  26. /* 游標懸浮時噗寶圖片網址 */
  27. #dynamic_logo:hover {
  28.   background: url(https://images.plurk.com/13uv53CwkswVSGic6cHkzM.gif) no-repeat center/contain;
  29. }
  30.  
  31. /* 點擊後切換為點擊後噗寶圖片 */
  32. #dynamic_logo:active #creature {
  33.   display: block;
  34. }
  35.  
  36. #creature {
  37.   /* 設定點擊後噗寶圖片長寬與點擊前相同 */
  38.   width: 100%;
  39.   height: 100%;
  40.  
  41.   /* 隱藏預設噗寶圖片 */
  42.   padding-right: 100%;
  43.   overflow: hidden;
  44.  
  45.   /* 點擊後噗寶圖片網址 */
  46.   background: url(https://images.plurk.com/TPy9hMCI1A3fbwDJL39nU.gif) no-repeat center/contain;
  47.  
  48.   /* 點擊後游標圖片網址 (尺寸限制在 128x128 內,超過尺寸不會顯示) */
  49.   cursor: url(https://images.plurk.com/45yHDqEtEfVoJvPR5pmFJ7.png), auto;
  50. }
  51.  
  52. /* 游標移開時切換為點擊前噗寶圖片 */
  53. #creature:not(:hover) {
  54.   display: none;
  55. }
  56.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement