首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SASS介质查询问题

SASS介质查询问题
EN

Stack Overflow用户
提问于 2018-11-04 07:02:05
回答 1查看 40关注 0票数 1

我有一个媒体查询,它在safari ios中正常工作,但文本在chrome ios上不能调整大小。

我只是简单地尝试嵌套那个特定h1标记的所有断点。

代码语言:javascript
复制
.page-h1 {
    color: #000;
    text-align: center;
    z-index: 1001;
    position: relative;
    font-family: 'Roboto', sans-serif;
    text-transform: uppercase;

    padding-top: 20px;  
    @media screen and (min-width: 380px) {
      font-size: 16px !important;
      letter-spacing: 2px;
    }
    @media screen and(min-width: 420px) {
      font-size: 22px !important;
      letter-spacing: 2px;
    }
    @media screen and(min-width: 650px) {
      font-size: 2em;
      letter-spacing: 2px;
    }
    @media screen and(min-width: 980px) {
      font-size: 3em;
      letter-spacing: 2px;
    }
    @media screen and(min-width: 1400px) {
      font-size: 3.5em;
      letter-spacing: 2px;
    }
}
EN

回答 1

Stack Overflow用户

发布于 2018-11-06 00:00:02

这是一个很小的语法问题。我只需要添加“唯一”。

代码语言:javascript
复制
.landing-h1 {
  @media only screen and (min-width: 320px) {
      font-size: 25px;
      line-height: 23px;
      margin-top: 48%;
      letter-spacing: 2px;
      word-spacing: 3px;
    }
    @media only screen and (min-width: 40px) {
      font-size: 30px;
      line-height: 40px;
      margin-top: 33%;
      letter-spacing: 2px;
      word-spacing: 5px;
    }
    @media only screen and (min-width: 650px) {
      font-size: 3.3em;
      line-height: 60px;
      margin-top: 24%;
      letter-spacing: 2px;
      word-spacing: 10px;
    }
    @media only screen and (min-width: 960px) {
      font-size: 5em;
      line-height: 95px;
      margin-top: 16%;
      letter-spacing: 2px;
      word-spacing: 15px;
    }
    color: #fccd31;
    text-align: center;
    z-index: 100001;
    position: relative;
    margin-top: 14%;
    font-family: 'Avenir';
    font-size: 5em;
    line-height: 100px;
    text-transform: uppercase;
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53136261

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档