Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.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选择器中字体大小的CSS媒体查询不起作用_Html_Css_Vue.js_Sass_Scss Mixins - Fatal编程技术网

更改html选择器中字体大小的CSS媒体查询不起作用

更改html选择器中字体大小的CSS媒体查询不起作用,html,css,vue.js,sass,scss-mixins,Html,Css,Vue.js,Sass,Scss Mixins,我使用62.5%的技巧来设置不同屏幕大小的字体大小。这些字母在大屏幕上看起来太小了,所以我想使用最小宽度的媒体查询将其字体大小增加到80%,但由于某些原因,这根本不起作用。我做错什么了吗? 我正在使用sass,该文件位于\u themes.scss文件中 编辑:当我查看inspector时,媒体查询被划掉并显示“未知属性名称” 您的媒体查询需要独立存在,在初始定义之外,而不是在其内部 *, *::before, *::after { margin: 0; padding: 0; bo

我使用62.5%的技巧来设置不同屏幕大小的字体大小。这些字母在大屏幕上看起来太小了,所以我想使用最小宽度的媒体查询将其字体大小增加到80%,但由于某些原因,这根本不起作用。我做错什么了吗? 我正在使用sass,该文件位于
\u themes.scss
文件中

编辑:当我查看inspector时,媒体查询被划掉并显示“未知属性名称


您的媒体查询需要独立存在,在初始定义之外,而不是在其内部

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 62.5%;
  
}
html,
body {
  overflow-x: hidden;
}
body {
  font-family: 'Poppins', Avenir, Helvetica, Arial, sans-serif;
  color: hsl(0, 0%, 100%);
  text-align: center;
  font-size: 1.6rem;
  min-height: 100vh;
}

  @media screen and (min-width: 1600px) {
    html {
      font-size: 80%;
    }
  }
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 62.5%;
  
}
html,
body {
  overflow-x: hidden;
}
body {
  font-family: 'Poppins', Avenir, Helvetica, Arial, sans-serif;
  color: hsl(0, 0%, 100%);
  text-align: center;
  font-size: 1.6rem;
  min-height: 100vh;
}

  @media screen and (min-width: 1600px) {
    html {
      font-size: 80%;
    }
  }