js+css实现炫酷p2p加密解密效果代码
代码语言:html
所属分类:其他
代码描述:js+css实现炫酷p2p加密解密效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Share+Tech+Mono&display=swap'); :root { --primary-color: #00ffaa; --primary-dark: #00cc88; --secondary-color: #ff00ff; --tertiary-color: #0088ff; --dark-bg: #0a0a12; --panel-bg: rgba(20, 20, 40, 0.7); --glass-highlight: rgba(255, 255, 255, 0.1); --glass-border: rgba(255, 255, 255, 0.05); --text-color: #ffffff; --text-dim: #a0a0a0; --neu-shadow-dark: rgba(5, 5, 10, 0.5); --neu-shadow-light: rgba(40, 40, 80, 0.5); --glow-radius: 15px; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Share Tech Mono', monospace; } body, html { width: 100%; height: 100%; overflow: hidden; background: var(--dark-bg); color: var(--text-color); } .app-container { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; background-image: radial-gradient(circle at 10% 10%, rgba(0, 255, 170, 0.05) 0%, transparent 50%), radial-gradient(circle at 90% 90%, rgba(255, 0, 255, 0.05) 0%, transparent 50%), linear-gradient(45deg, rgba(0, 0, 0, 0.9) 0%, rgba(10, 10, 18, 0.9) 100%); background-attachment: fixed; overflow: hidden; backdrop-filter: blur(3px); } .app-header { display: flex; justify-content: space-between; align-items: center; padding: 2vh 4vw; height: 15vh; position: relative; z-index: 10; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--glass-border); box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2); } .app-title { position: relative; } .app-title h1 { font-family: 'Orbitron', sans-serif; font-size: clamp(1.8rem, 4vw, 3.5rem); font-weight: 900; letter-spacing: 2px; color: var(--text-color); text-transform: uppercase; position: relative; text-shadow: 0 0 10px var(--primary-color), 0 0 20px rgba(0, 255, 170, 0.5); animation: titlePulse 4s infinite alternate; } .title-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; background: radial-gradient(ellipse at center, var(--primary-color) 0%, transparent 70%); opacity: 0.1; filter: blur(10px); z-index: -1; animation: glowPulse 4s infinite alternate; } .key-container { display: flex; align-items: center; gap: 1rem; } .key-container label { font-size: clamp(0.9rem, 1.5vw, 1.2rem); color: var(--text-dim); font-family: 'Orbitron', sans-serif; } .input-wrapper { position: relative; } .input-wrapper input { background-color: rgba(0, 255, 170, 0.05); border: 1px solid var(--glass-border); border-radius: 8px; padding: 10px 15px; color: var(--primary-color); font-size: clamp(0.9rem, 1.5vw, 1.2rem); width: clamp(150px, 20vw, 300px); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); transition: all 0.3s ease; box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2), 0 0 0 var(--glow-radius) rgba(0, 255, 170, 0); } .input-wrapper input:focus { outline: none; border-color: var(--primary-color); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(0, 255, 170, 0.2); } .input-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; background: radial-gradient(ellipse at center, var(--primary-color) 0%, transparent 70%); opacity: 0; filter: blur(10px); z-index: -1; transition: opacity 0.3s ease; } .input-wrapper input:focus + .input-glow { opacity: 0.2; } .help-button { width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--glass-border); color: var(--text-color); font-size: 1.2rem; font-weight: bold; cursor: pointer; box-shadow: -2px -2px 5px var(--neu-shadow-light), 2px 2px 5px var(--neu-shadow-dark); transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; } .help-button:hover { background: rgba(0, 0, 0, 0.4); box-shadow: -1px -1px 3px var(--neu-shadow-light), 1px 1px 3px var(--neu-shadow-dark), 0 0 10px var(--primary-color); color: var(--primary-color); } .help-button:active { box-shadow: inset -1px -1px 3px var(--neu-shadow-light), inset 1px 1px 3px var(--neu-shadow-dark); } .instructions-panel { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95); width: clamp(300px, 80%, 600px); background: var(--panel-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--glass-border); border-radius: 15px; padding: 2rem; z-index: 100; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 255, 170, 0.2); opacity: 0; visibility: hidden; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); } .instructions-panel.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); } .instructions-panel h2 { font-family: 'Orbitron', sans-serif; font-size: clamp(1.3rem, 3vw, 2rem); margin-bottom: 1.5rem; color: var(--primary-color); text-shadow: 0 0 10px rgba(0, 255, 170, 0.5); } .instructions-panel ol { margin: 0 0 1.5rem 1.5rem; line-height: 1.6; } .instructions-panel li { margin-bottom: 0.8rem; color: var(--text-dim); font-size: clamp(0.9rem, 1.5vw, 1.1rem); } .dismiss-button { padding: 10px 20px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--glass-border); border-radius: 8px; color: var(--text-color); font-size: 1rem; cursor: pointer; transition: all 0.3s ease; box-shadow: -2px -2px 5px var(--neu-shadow-light), 2px 2px 5px var(--neu-shadow-dark); margin: 0 auto; display: block; } .dismiss-button:hover { background: rgba(0, 0, 0, 0.4); color: var(--primary-color); box-shadow: -2px -2px 5px var(--neu-shadow-light), 2px 2px 5px var(--neu-shadow-dark), 0 0 10px var(--primary-color); } .dismiss-button:active { box-shadow: inset -1px -1px 3px var(--neu-shadow-light), inset 1px 1px 3px var(--neu-shadow-dark); } .content-area { flex: 1; display: flex; justify-content: center; align-items: center; padding: 2vh 4vw; overflow: hidden; position: relative; } .content-area::before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 20px), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 20px); z-index: -1; pointer-events: none; } .text-container { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 2vh; } .text-area-wrapper { flex: 1; position: relative; display: flex; flex-direction: column; } .text-area-wrapper label { margin-bottom: 0.5rem; font-family: 'Orbitron', sans-serif; font-size: clamp(0.9rem, 1.5vw, 1.1rem); color: var(--text-dim); } .text-area-wrapper textarea { width: 100%; height: 100%; padding: 1.5rem; background-color: rgba(0, 255, 170, 0.05); border: 1px solid var(--glass-border); border-radius: 15px; color: var(--text-color); font-size: clamp(1rem, 1.5vw, 1.3rem); line-height: 1.5; resize: none; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); transition: all 0.3s ease; box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 0 var(--glow-radius) rgba(0, 255, 170, 0); } .text-area-wrapper textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(0, 255, 170, 0.2); } .textarea-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; background: radial-gradient(ellipse at center, var(--primary-color) 0%, transparent 70%); opacity: 0; filter: blur(20px); z-index: -1; transition: opacity 0.3s ease; pointer-events: none; } .text-area-wrapper textarea:focus + .textarea-glow { opacity: 0.1; } .control-buttons { display: flex; justify-content: center; gap: 2vw; margin: 1vh 0; } .action-button { position: relative; padding: 12px 30px; border-radius: 12px; border: 1px solid var(--glass-border); font-size: clamp(1rem, 2vw, 1.3rem); font-family: 'Orbitron', sans-serif; text-transform: uppercase; letter-spacing: 2px; cursor: pointer; transition: all 0.3s ease; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); overflow: hidden; box-shadow: -3px -3px 6px var(--neu-shadow-light), 3px 3px 6px var(--neu-shadow-dark); } .action-button::before { content: ''; position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px; z-index: -1; border-radius: 12px; background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--tertiary-color), var(--primary-color)); background-size: 400%; opacity: 0; transition: opacity 0.3s ease; } .action-button:hover::before { opacity: 1; animation: glowBorder 3s linear infinite; } .action-button .button-text { position: relative; z-index: 2; } .encrypt .button-text { color: var(--primary-color); } .decrypt .button-text { color: var(--secondary-color); } .action-button:hover .button-text { color: white; } .action-button:active { transform: translateY(2px); box-shadow: -1px -1px 3px var(--neu-shadow-light), 1px 1px 3px var(--neu-shadow-dark); } .button-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; background: radial-gradient(ellipse at center, var(--primary-color) 0%, transparent 70%); opacity: 0; filter: blur(15px); z-index: 0; transition: opacity 0.3s ease; } .encrypt .button-glow { background: radial-gradient(ellipse at center, var(--primary-color) 0%, transparent 70%); } .decrypt .button-glow { background: radial-gradient(ellipse at center, var(--secondary-color) 0%, transparent 70%); } .action-button:hover .button-glow { opacity: 0.4; } .app-footer { height: 8vh; padding: 0 4vw; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--glass-border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2); position: relative; z-index: 10; } .footer-elements { width: 100%; display: flex; justify-content: space-between; align-items: center; } .status-indicator { display: flex; align-items: center; gap: 10px; } .status-dot { width: 12px; height: 12px; background-color: var(--primary-color); border-radius: 50%; box-shadow: 0 0 10px var(--primary-color); animation: pulse 2s infinite; } .status-text { color: var(--text-dim); font-size: 0.9rem; } .created-by { color: var(--text-dim); font-size: 0.9rem; } @keyframes pulse { 0.........完整代码请登录后点击上方下载按钮下载查看
网友评论0