效能
通過幀率: 平均 53.7 fps,p5 30 · 長任務: 0 個,共 0 毫秒,最長 0 毫秒 · 原始碼 gzip 2.9 KB · 執行時 4.2 KB
Spotlight cardsMIT招牌效果Original · clean-room
品質報告
等級和分數來自建置或測試時跑過的自動檢查。沒跑過的項目會標成「未檢測」,不會填假資料。
幀率: 平均 53.7 fps,p5 30 · 長任務: 0 個,共 0 毫秒,最長 0 毫秒 · 原始碼 gzip 2.9 KB · 執行時 4.2 KB
問題 0 · 讀屏: 通過
已回應減弱動效
無溢出
幀率和長任務是在無介面的 Chromium 裡用軟體 WebGL 測的,只適合在本站元件之間比較,不代表實機表現。
沒有 axe-core 違規。

檢測於 2026年11月15日 · 資料來自自動腳本,不是手工填寫。
以實際尺寸顯示。
複製內容以授權聲明開頭,使用程式碼時請保留。
<div class="sp"><div class="g"><article><strong>Spotlight</strong><span>Light follows the pointer inside each card.</span></article><article><strong>Rim</strong><span>A masked 1px border lights up too.</span></article><article><strong>Calm</strong><span>Off by default; nothing moves at rest.</span></article><article><strong>Grid</strong><span>Each card owns its own light.</span></article></div></div>
:root{--bg:#f1eee8;--card:#fff;--ink:#17181a;--line:rgba(0,0,0,.08);--spot:rgba(254,61,112,.16)}
:root[data-theme=dark]{--bg:#060607;--card:#0f0f12;--ink:#f3f1ec;--line:rgba(255,255,255,.08);--spot:rgba(255,106,136,.22)}
html,body{height:100%;margin:0;background:var(--bg)}
.sp{height:100%;display:grid;place-items:center}
.sp .g{display:grid;grid-template-columns:repeat(2,minmax(0,220px));gap:14px;padding:16px}
.sp article{--x:50%;--y:50%;position:relative;border-radius:18px;background:var(--card);padding:22px;color:var(--ink);font:400 12px/1.5 system-ui,sans-serif;box-shadow:inset 0 0 0 1px var(--line);overflow:hidden;min-height:120px}
.sp article::before{content:"";position:absolute;inset:0;background:radial-gradient(240px circle at var(--x) var(--y),var(--spot),transparent 60%);opacity:var(--o,0);transition:opacity .3s}
.sp article::after{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;background:radial-gradient(160px circle at var(--x) var(--y),#fe3d70,transparent 60%);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:var(--o,0);transition:opacity .3s}
.sp strong{display:block;font:italic 400 22px/1.1 Georgia,serif;margin-bottom:6px;position:relative}.sp span{opacity:.6;position:relative}
// fx-runtime.js (sets window.FX: theme, reduced motion, render loop)
/* Incidental AI Design Academy fx runtime (MIT). Theme from #dark/#light, reduced motion, visibility pause.
Small 2D canvases (≤640×640 device px, by backing size or on-screen box, when the context is created) are CPU-backed via willReadFrequently: sprite-heavy
components redraw many small canvases per frame, and GPU-backed readback/compositing of tiny canvases is the slow path. */
(function(){[window.HTMLCanvasElement,window.OffscreenCanvas].forEach(function(C){if(!C)return;var g=C.prototype.getContext;C.prototype.getContext=function(t,o){var a=this.width*this.height;if(this.isConnected&&this.getBoundingClientRect){var r=this.getBoundingClientRect(),p=window.devicePixelRatio||1;a=Math.max(a,r.width*r.height*p*p)}if(t==='2d'&&a<=409600){var x={};if(o)for(var k in o)x[k]=o[k];if(x.willReadFrequently===undefined)x.willReadFrequently=true;return g.call(this,t,x)}return g.apply(this,arguments)}})})();
(function(){var d=document.documentElement,q=function(){var h=location.hash.slice(1);if(h==='dark'||h==='light')d.dataset.theme=h;else if(!d.dataset.theme)d.dataset.theme=d.getAttribute('data-default')||'dark'};q();addEventListener('hashchange',function(){q();dispatchEvent(new Event('fx-theme'))});
var m=matchMedia('(prefers-reduced-motion: reduce)');window.FX={rm:m.matches,dark:function(){return d.dataset.theme==='dark'},loop:function(f){var on=true,t0=performance.now(),id=0;function step(t){f((t-t0)/1000);if(on&&!FX.rm)id=requestAnimationFrame(step)}if(FX.rm){f(2.2);addEventListener('fx-theme',function(){f(2.2)});return}id=requestAnimationFrame(step);document.addEventListener('visibilitychange',function(){if(document.hidden){on=false;cancelAnimationFrame(id)}else if(!on){on=true;id=requestAnimationFrame(step)}})}};
m.addEventListener&&m.addEventListener('change',function(){location.reload()})})();
// effect
(function(){var A=[].slice.call(document.querySelectorAll('.sp article'));function at(cx,cy){A.forEach(function(a){var r=a.getBoundingClientRect();a.style.setProperty('--x',cx-r.left+'px');a.style.setProperty('--y',cy-r.top+'px');a.style.setProperty('--o',1)})}
addEventListener('pointermove',function(e){auto=false;at(e.clientX,e.clientY)});var auto=true;
if(FX.rm){var r=A[0].getBoundingClientRect();at(r.left+r.width*.7,r.top+r.height*.3);return}
FX.loop(function(t){if(!auto)return;var g=document.querySelector('.sp .g').getBoundingClientRect();at(g.left+g.width*(.5+.42*Math.cos(t*.7)),g.top+g.height*(.5+.38*Math.sin(t*1.1)))});})();控制項 · HTML · CSS · JS
直接改程式碼,再用控制項微調,預覽會隨輸入即時更新。

線上編輯每個元件,用控制項微調,下載完整原始碼,複製進階提示詞。
一次性 $49暫定價格
測試模式:不會真的扣款。
免費:預覽、複製按鈕和課程說明。
柔光和發亮的邊框在每張卡片裡跟隨指標,整個網格會回應移動。
功能網格、價格表和連結卡片。
調光斑大小、光暈顏色、邊框寬度和淡出時間。
用純 HTML、CSS 和 JavaScript(不用框架)做一個「聚光卡片」元件。柔光和發亮的邊框在每張卡片裡跟隨指標,整個網格會回應移動。 適用場景:功能網格、價格表和連結卡片。 開放這些可調項:調光斑大小、光暈顏色、邊框寬度和淡出時間。 支援淺色和深色主題,遵守 prefers-reduced-motion 並給出靜止畫面,保證文字清晰、控制元件可用鍵盤操作。請寫原創程式碼,不要從付費或受限的元件庫複製。
更完整的提示詞,包含調參、無障礙和接入步驟。