How to properly join a few Media queries

半世苍凉 提交于 2019-12-13 06:36:07

问题


I have a situation and I decide to use media queries. The htmlcode:

...
   <span class="logotext-n">n</span>

    .
    .

   <span class="logotext-u">u</span>
...

Css implementation:

...
@media screen and (-webkit-min-device-pixel-ratio:0) { 
        .logotext-n {
          color: #f1ecd6;    
          font-family: "arial black", sans-serif;
          font-weight: 900;
          font-size: 210px;
          text-transform: lowercase;
          letter-spacing: -18px;
              }
}

        .
        .

@media screen and (-webkit-min-device-pixel-ratio:0) { 
        .logotext-u {
          color: #f1ecd6;    
          font-family: "arial black", sans-serif;
          font-weight: 900;
          font-size: 210px;
          text-transform: lowercase;
          letter-spacing: 0;
              }
}
... 

At this point I was wondering, is there any possibility to join these css properties using a single @media screen? Thanks


回答1:


yes, just put it together

@media screen and (-webkit-min-device-pixel-ratio:0) { 
      .logotext-n {
          color: #f1ecd6;    
          font-family: "arial black", sans-serif;
          font-weight: 900;
          font-size: 210px;
          text-transform: lowercase;
          letter-spacing: -18px;
       }

      .logotext-u {
          color: #f1ecd6;    
          font-family: "arial black", sans-serif;
          font-weight: 900;
          font-size: 210px;
          text-transform: lowercase;
          letter-spacing: 0;
      }
}

        .
        .


来源:https://stackoverflow.com/questions/30797986/how-to-properly-join-a-few-media-queries

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!