From b83804c92b22f97a06fec6522b8c86ba4d3457a9 Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Tue, 9 Apr 2024 16:58:28 +0800 Subject: [PATCH] change the style of copy-btn --- assets/css/main.css | 10 +++++----- assets/js/copy-code.js | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 38ef763..24f564c 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -803,7 +803,7 @@ ul.footer-menu>li { .highlight:hover .highlight-copy-btn { display: inline-block; - border: 1px solid var(--bg-color); + border: 1px solid rgba(255, 255, 255, 0.1); } .highlight-copy-btn { @@ -812,20 +812,20 @@ ul.footer-menu>li { top: 18px; right: 2px; border: 0; - border-radius: 4px; + border-radius: 6px; padding: 1px; font-size: 0.7em; line-height: 1.8; color: #fff; - background-color: #777; + background-color: rgba(255, 255, 255, 0.1); min-width: 25px; text-align: center; + transition: border 0.3s; } .highlight-copy-btn:hover { transition-duration: .1s; - background-color: #666; - border: 1px solid var(--bq-color) !important; + background-color: rgba(255, 255, 255, 0.3); cursor: pointer; } diff --git a/assets/js/copy-code.js b/assets/js/copy-code.js index e772f52..d23b0cf 100644 --- a/assets/js/copy-code.js +++ b/assets/js/copy-code.js @@ -11,9 +11,9 @@ document.addEventListener("DOMContentLoaded", function(event) { return; } - let svgCopyCode = ''; - let svgSuccessCode = ''; - let svgFailCode = ''; + let svgCopyCode = ''; + let svgSuccessCode = ''; + let svgFailCode = ''; function changeIcon(el, innerHtml) { el.innerHTML = innerHtml;