zoukankan      html  css  js  c++  java
  • SASS 中如何写IE7 hack

    初次尝试SASS,遇到hack问题,再次记下点滴。

    原先代码:

    #yzm{ +display: inline;}
    

      报错提示:

    Syntax error: Invalid CSS after "...+display:inline": expected "{", was ";"
            on line 31 of D:\root\wwwdemo\test\wtd\caigou\style.scss
      Use --trace for backtrace.
    

      解决方案:

    $hack_ie7:'+';
    #yzm{ #{$hack_ie7}display: inline; }
    

      其他参考:(我没看懂,希望有看到的人懂的帮下解释下,我猜大致是传参执行方法的意思)

    // Visible for IE <= 7
    =ie7-hack($property, $ie7-value)
      ##{$property}: #{$ie7-value}
    
    // Visible for IE <= 6
    =ie6-hack($property, $ie6-value)
      _#{$property}: #{$ie6-value}
    
    // this mixin has to be called last due to its usage of the ie8-hack mixin usage
    =gt-ie6-hack($property, $value)
      +ie7-hack($property, $value)
      +ie8-hack($property, $value)
    
    // Visible for IE = 8
    // this mixin has to be called last
    // @see: http://dimox.net/personal-css-hacks-for-ie6-ie7-ie8/
    =ie8-hack($property, $ie8-value)
      #{$property}: #{$ie8-value}#{"\0/"}
    
    // Allows to apply horizontal padding for buttons
    // @see: http://www.mrkirkland.com/internet-explorer-submit-button-horizontal-padding/
    =ie7-button-fix
      +ie7-hack('overflow', 'visible')
    

      

  • 相关阅读:
    linux随记
    springboot-2
    netty-lean1
    nginx
    自定义启动器
    arrayList add
    Mybatis 转义符
    idea 闪退 但是启动的服务还在解决办法
    java 通过map根据list某个字段进行合并
    java list的深拷贝
  • 原文地址:https://www.cnblogs.com/wangtuda/p/2892009.html
Copyright © 2011-2022 走看看