douchun2158 2017-05-06 00:16
浏览 26

为移动版使用不同的徽标

I would like to use a different logo for my mobile version.

I found out that you add another logo in your HTML source code and then define in CSS which logo is shown based on page size.

My problem is that I use Wordpress and can't really access the source code. I can only write something in the functions.php file.

My logo is places in the navigation bar, which makes it more difficult, too.

Would be soooo thankful for any help :)
Daniel

My Page

  • 写回答

2条回答 默认 最新

  • douzhi7082 2017-05-06 00:25
    关注

    Yes you can use media queries to do that for example :

    .mobile-logo-class { 
      display:none;
    }
    
    @media screen and (max-width: 768px) { // 768px or your break point
    
        .mobile-logo-class { 
          display: inline-block; // or block
        }
    
       .desktop-logo-class {
          display:none;
       }
    
    }
    

    Or you can use the "Picture" tag but be careful for IE Support: https://webdesign.tutsplus.com/tutorials/quick-tip-how-to-use-html5-picture-for-responsive-images--cms-21015

    评论

报告相同问题?

悬赏问题

  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算