Skip to content

Commit 53e28d6

Browse files
committed
css
1 parent 28d49ac commit 53e28d6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib/ZMD/ZPre.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<pre contenteditable="false" bind:innerText={content}><code
4040
class={$ast.children[0].properties?.class}><ZPreCode ast={$ast.children[0]}></ZPreCode></code
4141
></pre>
42-
<button {disabled} class="copyBtn" style="visibility: {visibility};" onclick={copyContent}>
42+
<button {disabled} class="copyBtn" onclick={copyContent}>
4343
<span style="visibility: {visibility};" class="hint">{hint}</span>
4444
<ZIcon height="1.5rem" width="1.5rem" option={icon}></ZIcon>
4545
</button>
@@ -61,7 +61,8 @@
6161
justify-content: center;
6262
box-sizing: border-box;
6363
padding: 0.2rem;
64-
opacity: 0.8;
64+
opacity: 0;
65+
transition: opacity 0.3s 1s ease;
6566
&:hover {
6667
cursor: pointer;
6768
path {
@@ -81,10 +82,9 @@
8182
&:hover {
8283
.copyBtn {
8384
visibility: visible !important;
85+
opacity: 0.8;
86+
transition: opacity 0.2s ease;
8487
}
85-
}
86-
pre{
87-
8888
}
8989
code.hljs {
9090
font-family: 'CascadiaMono';

0 commit comments

Comments
 (0)