6
respuestas

@media no se aplica

hola! Estoy tratando de usar el @media pero no me sirve :c no importa que le cambie ningun cambio fuinciona :c ni siquiera el display: none; para ocultar algo

@media screen and (max-width:480px){ .imagen{ display: none } }

6 respuestas

Hola paula, no sé que estás intentando hacer exactamente, pero te muestro como yo eh utilizado los @media

@media (min-width: 768px){ .servicios{ display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 2rem; } }

@media (min-width: 768px) { .navegacion-principal { flex-direction: row; justify-content: space-around; } }

@media (min-width: 768px){ .w-100{ width: auto; } }

si... intenta mostrar tu codigo completo para ver si no esta faltando quizas que agregues tu referencia de css a tu HTML

Estoy igual que Paula G., el css no se aplico, tocara descargarlo del profesor. Estos errores para un principiante es terrible, porque uno queda perdido. porque uno va a la par con el video explicativo y no funciona, por favor corregir este video de las media queries. Gracias

:( si está vinculado, pero por más que lo modifico con el @media screen and (max-width:480px) no se hace ningun cambio.

1 2

*{
    font-family: 'Inter', sans-serif;
    font-family: 'Montserrat', sans-serif;
}
header{
    width: 100%;
    height: 50px;
    background-color: #F3F5FC;
    margin-left: 50px;
    margin-top: 20px;
}

body{
    width: 940px;
    height: 100%;
    background-color: #F3F5FC ;
}
main{
    width: 100%;
    height: 90%;
    display: flex;
    position: absolute;
    justify-content: space-between;
}

section{
    width: 100%;
    height: 100%;
}
.section1{
    width: 70%;
    height: 90%;
    background-color: #F3F5FC;
    padding-left: 15px;
    box-sizing: border-box;

}
.texto-1{
    margin: 100px 100px;
    width: 90%;
    height: 60%;
    background: #F3F5FC;
    color: #0A3871;
    font-size: 32px;
    line-height: 48px;
    border: none;
    display: block;
    resize: none;
    outline: none;
}
.contendor-botones-principales{
    margin-left: 30%;
}
.vector{
    margin-right: 10px;
    align-self: center;
}
.rules{
    font-size: 12px;
    line-height: 18px;
    text-align: left;
    vertical-align: center;
    padding-bottom: 20px;
    padding-left: 20px;
}


.btnEncriptar{
    width: 30%;
    height: 60px;
    fill: solid;
    background-color: #0A3871;
    border-radius: 24px;
    color: #F3F5FC;
    font-size: 20px;
    line-height: 19px;
    line-height: 100%;
    text-align: center;
    border-color: #0A3871;
    transition: 1s all;
    cursor: pointer;
}
.btnEncriptar:hover{
    background-color: #476CDF;
    border-color: #476CDF;
    transform: scale(1.2);
    box-shadow: 5px 5px 5px 5px #112258;
    opacity: 0.8;
}
.btnDesencriptar{
    width: 30%;
    height: 60px;
    fill: solid;
    background-color: #F3F5FC;
    border-radius: 24px;
    font-size: 20px;
    line-height: 19px;
    line-height: 100%;
    text-align: center;
    color: #0A3871;
    border-color: #0A3871;
    margin-left: 20%;
    transition: 1s all;
    cursor: pointer;
}
.btnDesencriptar:hover{
    color: #F3F5FC;
    background-color: #85B4F0;
    border-color: #85B4F0;
    transform: scale(1.2);
    box-shadow: 5px 5px 5px 5px #5787C4;
    opacity: 0.8;
}

.section2{
    width: 22%;
    height: 96%;
    margin-right: 30px;
    background-color: #FFFFFF;
    border-radius: 32px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 10px 10px 10px 10px rgba(0, 0, 0, 0.08);
}

.contenedor-munheco{
    width: 80%;
    height: 60%;
    padding-top: 120px;
    box-sizing: border-box;
    overflow: auto;
    margin-left: 30px;
}
.munheco{
    margin: 0 auto;
    width: 100%;
}
.contenedor-textos{
    text-align: center;
    height: 45%;
}
.no-mensaje {
    color: #343A40;
    font-size: 24px;
    line-height: 29px;
    vertical-align: top;
    padding: 2px 10px;
    font-weight: bold;
    margin: auto 10px;
}
.ingresa-texto{
    color: #495057;
    font-size: 16px;
    line-height: 24px;
    vertical-align: top;
    text-align: center;
    margin: 10px 10px;
    font-weight: bold;
}
.contenedor-resultado{
    box-sizing: border-box;

}
.texto-resultado{
    width: 60%;
    height: 30%;
    padding-top: 100px;
    box-sizing: border-box;
    overflow: auto;
    margin-left: 30px;
    background: #FFFFFF;
    color: #0A3871;
    font-size: 32px;
    line-height: 48px;
    border: none;
    display: block;
    resize: none;
    margin: 10% 2%;
    margin-left: 10%;
    outline: none;
}
.boton-copiar{
    margin-bottom: 20%;
}
.btnCopiar{
    width: 80%;
    height: 60px;
    text-align: center;
    fill: solid;
    border-radius: 24px;
    background-color: #FFFFFF;
    font-size: 20px;
    line-height: 19px;
    line-height: 100%;
    color: #0A3871;
    margin: 0 10%; 
    border-color: #0A3871;
    transition: 1s all;
    cursor: pointer;
    margin-bottom: 4px;
}
.btnCopiar:hover{
    color: white;
    background-color: #85B4F0;
    border-color: #85B4F0;
    transform: scale(1.2);
    box-shadow: 5px 5px 5px 5px #112258;
    opacity: 0.8;
}
.btnBorrar{
    width: 80%;
    height: 60px;
    text-align: center;
    fill: solid;
    border-radius: 24px;
    background-color: #0A3871;
    color: white;
    font-size: 20px;
    line-height: 19px;
    line-height: 100%;
    margin: 0 10%;
    border-color: #0A3871;
    transition: 1s all;
    cursor: pointer;
    margin-top: 4px;
}
.btnBorrar:hover{
    background-color: #476CDF;
    border-color: #476CDF;
    transform: scale(1.2);
    box-shadow: 5px 5px 5px 5px #5787C4;
    opacity: 0.8;
}
footer{
    width: 100%;
    height: 40px;
    position: absolute;
    bottom: 0;
    text-align: center;
    background-color: #F3F5FC;
    font-family: 'Inter', sans-serif;
    font-family: 'Montserrat', sans-serif;
}

.ocultar{
    display: none;
}

@media screen and (max-width:480px){
    main{
        justify-content: space-between;
    }
    .section1{
        width: 100%;
        height: 50%;
        position: absolute;
        margin-top: 10%;
    }
    .section2{
        width: 100%;
        height: 50%;
        margin-top: 50%;
        position: absolute;
    }
}

`