88 lines
2.1 KiB
CSS
88 lines
2.1 KiB
CSS
.share-container {
|
|
position: relative;
|
|
display: inline-block; /* Para que solo ocupe el ancho necesario */
|
|
}
|
|
|
|
.share-toggle {
|
|
background-color: #eee;
|
|
color: #333;
|
|
border-radius: 50%;
|
|
width: 40px;
|
|
height: 40px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
font-size: 1.2rem;
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
|
|
.share-toggle:hover {
|
|
background-color: #ddd;
|
|
}
|
|
|
|
|
|
.share-buttons {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 100%; /* Mueve el bloque justo a la derecha del botón toggle */
|
|
transform: translateY(-50%); /* Centra verticalmente */
|
|
background-color: #fff;
|
|
border: 1px solid #ccc;
|
|
border-radius: 5px;
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
display: none;
|
|
flex-direction: row;
|
|
padding: 8px;
|
|
z-index: 10;
|
|
white-space: nowrap; /* Para evitar que se corte si es muy estrecho */
|
|
}
|
|
|
|
|
|
.share-container:hover .share-buttons {
|
|
display: flex; /* Mostrar al hacer hover en el contenedor */
|
|
}
|
|
|
|
.share-btn {
|
|
background: none;
|
|
border: none;
|
|
outline: none;
|
|
cursor: pointer;
|
|
font-size: 1.1rem;
|
|
margin: 0 5px;
|
|
color: #555;
|
|
transition: color 0.3s ease;
|
|
width: 30px; /* Ancho fijo para mantener la forma */
|
|
height: 30px; /* Alto fijo para mantener la forma */
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.share-btn:hover {
|
|
color: #007bff; /* Un color de ejemplo al hacer hover */
|
|
}
|
|
|
|
/* Estilos específicos para cada red social (opcional) */
|
|
.share-btn.mail:hover { color: #EA4335; } /* Rojo de Gmail */
|
|
.share-btn.in:hover { color: #0077B5; } /* Azul de LinkedIn */
|
|
.share-btn.fb:hover { color: #1877F2; } /* Azul de Facebook */
|
|
.share-btn.tw:hover { color: #000000; } /* Negro de X (Twitter) */
|
|
.share-btn.wa:hover { color: #25D366; } /* Verde de WhatsApp */
|
|
.share-btn.copy:hover { color: #6c757d; } /* Gris para copiar enlace */
|
|
|
|
/* Responsive Design */
|
|
@media (max-width: 500px) {
|
|
.share-buttons {
|
|
flex-direction: column; /* Apilar los botones en pantallas pequeñas */
|
|
align-items: center;
|
|
left: auto;
|
|
right: 0;
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.share-btn {
|
|
margin: 5px 0;
|
|
}
|
|
} |