css - 当我最小化浏览器窗口大小时,页面看起来异常

标签 css html

我正在从互联网上学习 html,这就是我尝试过的

<!doctype html>
<html>
   <body>
       <table cellspacing="0" style="margin-left:250px;margin-top:100px">
           <tr><td style="background-color:#EBEBF5;font-size:15px">Profile Info </td></tr>
           <tr><td>Sports & Fun</td></tr>
           <tr><td>Add More</td></tr>
       </table>
    </body>
</html>

好的,当我的窗口最大化时,输出就像这样

  Profile Info
  Sports & Fun 
  Add More

现在我已将窗口最小化并开始将其压缩得更小,当我将窗口压缩得更小时。

输出是这样的

   Profile
   Info
   Sports
   & Fun
   Add 
   More

我认为这种行为可能是由于窗口尺寸变小,然后我开始在 google、facebook、stackoverflow 网站上进行实验,虽然我将它们的窗口尺寸变小,但它们看起来仍然像以前一样,底部的滚动条增加了。我想知道为什么它不适用于我的。

谁能帮我解决这些问题?我怎样才能让我的 html 页面看起来像我的意思是当窗口最大化时甚至没有最大化时看起来一样?我希望我的 html 页面即使在最小化时看起来也一样,就像这些

  Profile Info
  Sports & Fun 
  Add More

最佳答案

HTML 页面调整大小以适应窗口大小。如果您不希望这样,请指定 width:

<table cellspacing="0" style="margin-left:250px;margin-top:100px; width:250px">

关于css - 当我最小化浏览器窗口大小时,页面看起来异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7718378/

相关文章:

css - 无法弄清楚为什么我的 SASS 无法工作

php - 如何防止在 php html 中包装 div

css - 在 scss 文件 rails 中添加图像作为图标?

html - 如何垂直对齐多组单选按钮?

html - 与顶部 :0px;min-height:100% the div collapses even if the height of the parent is fixed

css - 固定元素的响应部分

asp.net - 将鼠标悬停在图像上时需要 CSS 效果,以便在其上方显示另一个图像和/或文本

javascript - .hover() Jquery 需要帮助

javascript - 循环遍历所有子元素

html - CSS:将 Div 添加到 Div(圆 Angular 讨论)