Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
问题是,我刚刚将所有正文设置也应用到html <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" _Html_Css - Fatal编程技术网

问题是,我刚刚将所有正文设置也应用到html <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible"

问题是,我刚刚将所有正文设置也应用到html <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" ,html,css,Html,Css,问题是,我刚刚将所有正文设置也应用到html <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0&q

问题是,我刚刚将所有正文设置也应用到html


<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>ToneCover</title>
  <style>
    html {
        height: 100vh;
      width: 100vw;
      padding: 5vw;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      }
body {
      --def: #5F4E39;
      --inv: #9F917E;
      display: flex;
      justify-content: center;
      align-items: flex-start;
      flex-direction: column;
      height: 100vh;
      width: 100vw;
      padding: 5vw;
      background-color: #5F4E39;
    }
    
    button {
      background: none;
      color: inherit;
      border: none;
      padding: 0;
      font: inherit;
      cursor: pointer;
      outline: inherit;
    }
    
    .btn {
      position: relative;
      padding: 1.4rem 4.2rem;
      padding-right: 3.1rem;
      font-size: 1.4rem;
      color: var(--inv);
      letter-spacing: 1.1rem;
      text-transform: uppercase;
      transition: all 500ms cubic-bezier(0.77, 0, 0.175, 1);
      cursor: pointer;
      user-select: none;
    }
    
    .btn:before,
    .btn:after {
      content: '';
      position: absolute;
      transition: inherit;
      z-index: -1;
    }
    
    .btn:hover {
      color: var(--def);
      transition-delay: .5s;
    }
    
    .btn:hover:before {
      transition-delay: 0s;
    }
    
    .btn:hover:after {
      background: var(--inv);
      transition-delay: .35s;
    }
    /* From Top */
    
    .from-top:before,
    .from-top:after {
      left: 0;
      height: 0;
      width: 100%;
    }
    
    .from-top:before {
      bottom: 0;
      border: 1px solid var(--inv);
      border-top: 0;
      border-bottom: 0;
    }
    
    .from-top:after {
      top: 0;
      height: 0;
    }
    
    .from-top:hover:before,
    .from-top:hover:after {
      height: 100%;
    }
    
    *,
    *:before,
    *:after {
      box-sizing: border-box;
    }
    
    html {
      font-size: 20px;
      font-family: 'Playfair Display', serif;
    }
    
    div {
      margin-bottom: 3rem;
    }
    
    div:last-child {
      margin-bottom: 0;
    }
    
    .title {
      font-size: 120px;
      font-family: 'Playfair Display', serif;
      align-self: flex-end;
    }
    
    .click {
      color: #7a6954;
      font-size: 30px;
      font-family: 'Playfair Display', serif;
    }
    
    a {
      text-decoration: none;
    }
  </style>
</head>

<body>

  <button type="button" class="btn from-top"><a href="ToneMain.html" class="click">Single-Player</a></button>

  <div class="title">T o n e . i o</div>

  <button type="button" class="btn from-top"><a href="Tone.html" class="click">Multi-Player</a></button>

</body>

</html>```

除了主要的问题之外,在HTML中,不允许在按钮中包含a标记,或者相反,您必须为您的场景选择最佳标记。在您的例子中,我可以看到锚标记有一个指向另一个文件的href属性,我假设这里使用a标记而不是按钮标记。PS:这与向右对齐div的问题无关,这主要是一个语义错误。有两个因素阻碍了float的工作:一个是您使用绝对按钮定位按钮,但更重要的是,绝对位置与左侧相结合:0;在你的css中。css的顺序也很重要,你在顶部有按钮css,甚至在主体和你的类之前。点击最后的类-所有这些因素都会影响外观。调整顺序和位置。我想用这个按钮让页面转到另一个html文件,我尝试了很多选项很长一段时间,这似乎是可行的。但是它只在你点击文本时起作用,因为文本很大,所以暂时可以,但我仍然不确定如何让按钮加载另一个html文件;在标题类中,但对齐项目:居中;在div类中,使文本对齐:right;我从主体类中删除了align items:center,它显示在左侧,没有任何变化。或者您想将其对齐在窗口的右侧而不是身体标签的右侧?是否有办法只移动标题并将按钮保留在原来的位置???另外,Idk右边的那一行是lmao,它是背景吗?你可以尝试对齐项目:flex start,而不是对齐项目:在主体上居中。右边的线条是因为使用了视口单位。更改为自动。视口单位???Idk如何摆脱线;-;我真是个笨蛋。我也无法使主体适应屏幕,因此没有滚动条;-;我将背景图像更改为背景色,只保留了一种颜色,这就解决了条形图的问题。我已经这样做了,似乎没有任何区别,但响应的thx没有问题