Consultas de medios CSS asistencia

0

Pregunta

Estoy trabajando en un proyecto de práctica para aprender algunos de los principales fundamentos de CSS y HTML. Actualmente estoy teniendo problemas para entrar a mi página web para llegar a responder, con preguntas de los medios, tengo otros proyectos en los que las consultas de medios de trabajo, pero este en específico no se, alguna solución?

<!DOCTYPE html>
<link rel="stylesheet" href="resumecss.css">
<meta name="viewport" content="width=device-width">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <body>
<title></title>
<meta name="description" content="Our first page">
<div class="box">
<img class="chung" src="chungus.png">
<h1 class="top">Cameron Marshall</h1>
</div>
<div class="container">
    <div class="a">Contact Info:</div>
    <div class="b">Skills:</div>
    <div class="c">Objective:</div>
    <div class="d">Work Experience:</div>
    <div class="e"></div>
</div>
</body>
</head>
</html>
    body{
        margin:0;
        padding:0;
        height:100%;
    }
    .box{
        background-color:lightblue;
        height:350px;}
    img{
        height:200px;width:200px;
        border-radius:50%;
        border:solid 2px black;
        display: block;
        margin-left: auto;
        margin-right: auto;
        background-color:white;
        position:relative;
        top:20px;}
    .top{
        text-align:center;
        font-size:4rem;
        position:relative;
        top:20px;}
    .container{
        max-width:100%;
        margin-left: auto;
        margin-right: auto;}
    .container{
        width:50%;
        height:100%;
        border: 8px solid black;
        display:flex;
        flex-wrap: wrap;
        }
    .a{
        width:100%;
        height:200px;
        background-color:grey;}
    .a {text-align:center;}
    .b{
        width:50%;
        height:600px;
        background-color:lightgrey;}
    .c{
        width:50%;
        height:600px;
        background-color:lightgrey
        ;}
    .d{
        width:100%;
        height:400px;
        background-color:white;}
    .e{
        width:100%;
        height:200px;
        background-color:grey;}
    @media screen and(max-width:500px){
        h1{color:blue;}}

***Estoy intentando cambiar el color del texto del título cuando minimizado por debajo de 500 px, me parece que no puede conseguir cualquier consultas de medios para trabajar incluso con un diseño básico. ***

css html media-queries responsive-design
2021-11-24 02:10:15
1

Mejor respuesta

0

Resulta ser una falta de espacio en blanco aquí:

@media screen and (max-width:500px) {
                 ^

Usted tenía:

@media screen and(max-width:500px) {

Aviso no hay espacio entre and(.

A veces son las pequeñas cosas...

body {
  margin: 0;
  padding: 0;
  height: 100%;
}

.box {
  background-color: lightblue;
  height: 350px;
}

img {
  height: 200px;
  width: 200px;
  border-radius: 50%;
  border: solid 2px black;
  display: block;
  margin-left: auto;
  margin-right: auto;
  background-color: white;
  position: relative;
  top: 20px;
}

.top {
  text-align: center;
  font-size: 4rem;
  position: relative;
  top: 20px;
}

.container {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.container {
  width: 50%;
  height: 100%;
  border: 8px solid black;
  display: flex;
  flex-wrap: wrap;
}

.a {
  width: 100%;
  height: 200px;
  background-color: grey;
}

.a {
  text-align: center;
}

.b {
  width: 50%;
  height: 600px;
  background-color: lightgrey;
}

.c {
  width: 50%;
  height: 600px;
  background-color: lightgrey;
}

.d {
  width: 100%;
  height: 400px;
  background-color: white;
}

.e {
  width: 100%;
  height: 200px;
  background-color: grey;
}

@media screen and (max-width:500px) {
  h1 {
    color: blue;
  }
}
<!DOCTYPE html>
<link rel="stylesheet" href="resumecss.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width">

  <body>
    <title></title>
    <meta name="description" content="Our first page">
    <div class="box">
      <img class="chung" src="chungus.png">
      <h1 class="top">Cameron Marshall</h1>
    </div>
    <div class="container">
      <div class="a">Contact Info:</div>
      <div class="b">Skills:</div>
      <div class="c">Objective:</div>
      <div class="d">Work Experience:</div>
      <div class="e"></div>
    </div>
  </body>
</head>

</html>

2021-11-24 02:35:22

Gracias hombre! aprecio mucho, que parecía ser.
Cameron Marshall

En otros idiomas

Esta página está en otros idiomas

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Slovenský
..................................................................................................................