|
|
本帖最后由 CEO 于 2026-4-2 16:16 编辑
分享一款好看的描边脚本
- // ==UserScript==
- // @name Via纯脉冲边框美化
- // @namespace via-border-pulse
- // @version 1.3
- // @match *://*/*
- // @grant none
- // @run-at document-start
- // ==/UserScript==
- (function() {
- 'use strict';
- const style = document.createElement('style');
- style.textContent = `
- html, body {
- box-sizing: border-box;
- border: 2px solid transparent;
- border-radius: 6px;
- padding: 4px;
- animation: borderPulse 5s ease-in-out infinite;
- }
- @keyframes borderPulse {
- 0% { box-shadow: 0 0 8px #4facfe, 0 0 12px #4facfe66; }
- 25% { box-shadow: 0 0 8px #00f2fe, 0 0 12px #00f2fe66; }
- 50% { box-shadow: 0 0 8px #43e97b, 0 0 12px #43e97b66; }
- 75% { box-shadow: 0 0 8px #fa709a, 0 0 12px #fa709a66; }
- 100% { box-shadow: 0 0 8px #4facfe, 0 0 12px #4facfe66; }
- }
- `;
- document.documentElement.appendChild(style);
- })();
复制代码
另外给via主页添加同样效果描边,从浏览器这里添加:
设置——定制——高级——自定义CSS
粘贴以下代码- /* 脉冲边框样式 */
- html, body {
- box-sizing: border-box;
- border: 2px solid transparent;
- border-radius: 6px;
- padding: 4px;
- animation: borderPulse 5s ease-in-out infinite;
- }
- @keyframes borderPulse {
- 0% { box-shadow: 0 0 8px #4facfe, 0 0 12px #4facfe66; }
- 25% { box-shadow: 0 0 8px #00f2fe, 0 0 12px #00f2fe66; }
- 50% { box-shadow: 0 0 8px #43e97b, 0 0 12px #43e97b66; }
- 75% { box-shadow: 0 0 8px #fa709a, 0 0 12px #fa709a66; }
- 100% { box-shadow: 0 0 8px #4facfe, 0 0 12px #4facfe66; }
- }
复制代码 |
|