English 中文(简体)
是否有任何明确的理由说明这一媒体格格格格格格格格格格格不入?
原标题:Is there any clear reason why this media query grid would not work?
  • 时间:2024-01-26 18:28:08
  •  标签:
  • html
  • css

我正试图制造媒体问询,以便把我一页改为转民后的一个网,以进行家务劳动。 我在首页上被困,因为一旦屏幕尺寸发生变化,我不能把我一页变成一个电网。 我认为,当我改变“手法”和“密码”时,媒体对DOES的工作就会改变。 但我不能让他们坐在一边。 我不断尝试不同的方法,我可以说明为什么会赢得“稳定”阶级的变革。 如果情况完全明显,我仍然感到担忧,并试图学会如何将我所介绍的这个小点重新定位。

/* CSS (of the media query) */

@media screen and (min-width: 772px) {
  .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 10px;
    padding: 10px;
  }
  .man {
    grid-column: 1;
    grid-row: 1;
  }
  .aboutme {
    grid-column: 2;
    grid-row: 1;
  }
}


/* CSS (default, directly above the query - how I want it
to look mobile-view, as I was instructed to start) */

.aboutme {
  width: 80%;
  margin: 10px;
  padding: 10px;
}

.man {
  width: 100%;
  margin: 5px;
  padding-top: 25px;
}

.aboutme p {
  font-size: 120%;
}
<header>
  <img src="logo.png" class="logo" alt="site logo">
  <nav>
    <ul>
      <li><a href="main.html">Home</a></li>
      <li><a href="alarry.html">About</a>
        <ul>
          <li><a href="#">Larry</a></li>
          <li><a href="#">His Owners</a></li>
        </ul>
      </li>
      <li><a href="gallery.html">Gallery</a></li>
      <li><a href="">Contact</a></li>
    </ul>
  </nav>
</header>
<div class="container">
  <img src="untitled-design.jpg" class="man" alt="Big photo">
  <div class="aboutme">
    <h2>The cat, the myth, the legend...</h2>
    <p>Welcome to Larry s Lair! Come meet the cat that everyone is talking about. If you re looking for soft fur, many yawns, and - you guessed it!- no teeth, you ve come to the right place. This site is the epicenter of all your much needed Larry content.
      We re happy to invite you to learn more about this unique cat!<br> Larry gets up to crazy antics - all the time! One minute he s snug as a bug in a rug in his bed, and the next he s bounding across the apartment! He jumps from bed to chair to table
      (where he knows he shouldn t be.) What s life with a cat without a bit of mischief?<br> We would be remiss not to mention Larry s affection for cuddling. If he hears you at the door coming home, he ll be waiting with purrs and kisses! He wants to
      shower you in his fluffy love (but he may also start to gnaw on your arm... to each their own!) Larry really is a special little kitty.</p>
  </div>
</div>

我尝试采用不同的战略来建立网格——设置一栏以进行自动化,尝试一栏模板,以及以不同方式指导儿童内容进入网。 但我认为,集装箱是问题,但我看不出超文本和中央支助事务之间有任何脱节。 也许,它使我面临饥饿,但我还没有 star。

问题回答

www.un.org/Depts/DGACM/index_spanish.htm 订正本

/* The default CSS */
.aboutme {
  margin: 10px;
  padding: 10px;
}

.man {
  margin: 5px;
  padding-top: 25px;
}

.aboutme p {
  font-size: 120%;
}

/* --- the rest your default CSS --- */

/* A media Query for larger screens */
@media screen and (min-width: 772px) {
  .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 10px;
    padding: 10px;
  }
  .man, .aboutme {
    width: auto;
  }
  .man {
    grid-column: 1;
  }
  .aboutme {
    grid-column: 2;
  }
}

在经过更新的版本中,我们把内容的宽度与以下几类内容作了调整:.man.aboutme 。 这一变化使电网能够动态地确定其血缘。 必须确保你的超文本结构与这些特别安全等级相适应。

如果你遇到任何进一步的问题,利用你的浏览器开发工具检查这些要素可能是有益的。 这样,你就可以发现任何可能影响布局的意外风格或结构性问题。

我只是尝试了这et子,看着它的工作吗? <代码>.man和.aboutme <>/code>在座,.container在座标上适用网格风格,但不得低于。

Your page working as expected:

“entergraph





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!