Template:Navi: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<button | <noinclude> | ||
<style> | |||
.copy-button { | |||
background-color: #4CAF50; /* Verde */ | |||
color: white; | |||
padding: 10px 20px; | |||
border: none; | |||
border-radius: 4px; | |||
cursor: pointer; | |||
} | |||
.copy-notification { | |||
display: none; | |||
position: absolute; | |||
top: -30px; | |||
right: 0; | |||
background-color: #4CAF50; | |||
color: white; | |||
padding: 5px 10px; | |||
border-radius: 4px; | |||
opacity: 0; | |||
transition: opacity 0.3s ease-in-out; | |||
} | |||
.copy-button:hover + .copy-notification { | |||
display: block; | |||
opacity: 1; | |||
} | |||
</style> | |||
</noinclude> | |||
<span style="display: inline-block; position: relative;"> | |||
<button class="copy-button" onclick="navigator.clipboard.writeText('{{CONTENIDO}}'); this.innerText = 'Copiado!'; this.nextElementSibling.innerText = '¡Copiado con éxito!';">Click aquí para copiar</button> | |||
<span class="copy-notification"></span> | |||
{{CONTENIDO}} | |||
</span> |
Revision as of 19:40, 4 January 2025
<style> .copy-button {
background-color: #4CAF50; /* Verde */ color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer;
}
.copy-notification {
display: none; position: absolute; top: -30px; right: 0; background-color: #4CAF50; color: white; padding: 5px 10px; border-radius: 4px; opacity: 0; transition: opacity 0.3s ease-in-out;
}
.copy-button:hover + .copy-notification {
display: block; opacity: 1;
} </style>
<button class="copy-button" onclick="navigator.clipboard.writeText('Template:CONTENIDO'); this.innerText = 'Copiado!'; this.nextElementSibling.innerText = '¡Copiado con éxito!';">Click aquí para copiar</button> Template:CONTENIDO