如何正确加入几个媒体查询 [英] How to properly join a few Media queries

查看:85
本文介绍了如何正确加入几个媒体查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个情况,我决定使用媒体查询
html 代码:

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 实现:

...
@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;
              }
}
... 

是否有可能使用单个 @media屏幕加入这些 css 属性?感谢

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

推荐答案

是的,只要把它放在一起

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;
      }
}

        .
        .

这篇关于如何正确加入几个媒体查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆