Skip to content

Instantly share code, notes, and snippets.

@JCervantesB
Created March 15, 2022 20:10
Show Gist options
  • Save JCervantesB/d4e43c89322b3b7977d18a295036af44 to your computer and use it in GitHub Desktop.
Save JCervantesB/d4e43c89322b3b7977d18a295036af44 to your computer and use it in GitHub Desktop.
Hoja de estilos proyecto freelance
:root {
--blanco: #ffffff;
--primario: #FFC107;
--secundario: #0097A7;
--gris: #757575;
--oscuro: #212121;
}
html {
box-sizing: border-box;
min-height: 100%;
scroll-snap-type: y mandatory;
}
*, *:before, *:after {
box-sizing: inherit;
}
p {
line-height: 2;
}
body {
font-family: 'Krub', sans-serif;
background-image: linear-gradient(to top, #dfe9f3 0%, white 100%);
min-height: 100%;
}
h1 {
font-size: 1.4rem;
}
h1 span {
font-size: 1.4rem;
}
h1, h2, h3 {
text-align: center;
}
h2 {
font-size: 2.4rem;
}
h3 {
color: var(--secundario);
font-weight: 400;
font-size: 1.6rem;
}
.contenedor {
margin: 0 auto;
max-width: 1200px;
}
.sombra {
padding: 2rem;
margin-bottom: 3rem;
background-color: rgba(255, 255, 255, 1);
border-radius: 10px;
-webkit-box-shadow: 0px 11px 15px -9px rgba(0,0,0,0.63);
-moz-box-shadow: 0px 11px 15px -9px rgba(0,0,0,0.63);
box-shadow: 0px 11px 15px -9px rgba(0,0,0,0.63);
}
.nav-bg {
background-color: var(--secundario);
}
.navegacion {
scroll-snap-align: start;
scroll-snap-stop: always;
display: flex;
flex-direction: column;
align-items: center;
}
@media (min-width:768px) {
.navegacion {
flex-direction: row;
justify-content: space-between;
}
}
.navegacion a{
padding: 1rem 2rem;
color: var(--blanco);
text-decoration: none;
font-size: 1.4rem;
font-weight: 700;
}
.navegacion a:hover {
background-color: var(--primario);
color: var(--oscuro);
}
.navegacion a:last-of-type {
margin-bottom:0;
}
@media (min-width:768px) {
.navegacion a{
margin-bottom: 0;
}
}
.hero {
height: 450px;
background-image: url(../img/hero.jpg);
margin-bottom: 2rem;
position: relative;
}
.contenido-hero {
background-color: rgb(0 0 0 / 70%); /** Otra opción **/
background-color: rgba(0, 0, 0, .7);
position: absolute;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.contenido-hero h2,
.contenido-hero p {
color: var(--blanco);
}
.boton {
background-color: var(--secundario);
color: var(--blanco);
margin-top: .5rem;
padding: .5rem 3rem;
border-radius: 5px;
font-weight: 700;
text-decoration: none;
text-transform: uppercase;
font-size: 1.2rem;
border:none;
}
.boton:hover{
cursor: pointer;
}
.servicios {
scroll-snap-align: start;
scroll-snap-stop: always;
}
@media (min-width:768px) {
.servicios {
display: grid;
grid-template-columns: 33.3% 33.3% 33.3%;
column-gap: 1rem;
}
}
.servicio {
text-align:center;
}
.servicio {
display: flex;
flex-direction: column;
align-items: center;
}
.iconos {
display: flex;
height: 150px;
width: 150px;
justify-content: space-evenly;
align-items: center;
background-color: var(--primario);
border-radius: 50%;
}
.iconos i {
font-size: 2rem;
color: var(--oscuro);
}
.formulario {
background-color: var(--gris);
padding: 2rem;
border-radius: 10px;
scroll-snap-align: start;
scroll-snap-stop: always;
}
.formulario legend {
text-align: center;
font-size: 1.2rem;
color: var(--primario);
margin-bottom: 2rem;
display: block;
text-transform: uppercase;
font-weight: 700;
}
@media (min-width:768px) {
.formulario {
max-width: 800px;
margin: 0 auto;
}
}
.contenedor-campos {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.campo {
margin-bottom: 1rem;
width: 100%;
}
@media (min-width:480px) {
.campo {
display: flex;
align-items: center;
}
}
@media (min-width: 768px) {
.campo{
flex: 0 0 calc(50% - .5rem)
}
}
.campo label {
color: var(--blanco);
font-weight: 700;
margin-bottom: .5rem;
display: block;
}
@media (min-width:480px) {
.campo label {
flex: 0 0 90px;
}
}
.campo input[type="text"],
.campo input[type="tel"],
.campo input[type="mail"],
.campo textarea {
width: 100%;
padding: .5rem;
border: none;
border-radius: .5rem;
}
@media (min-width: 768px) {
:is(.campo) :is(
input[type="text"],
input[type="text"],
input[type="tel"],
input[type="mail"] ,
textarea ) {
flex: 1;
}
}
.w-100{
flex: 0 0 100%;
}
.campo textarea {
height: 4rem;
}
.enviar {
display: flex;
justify-content: flex-end;
}
.footer {
text-align: center;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment