使用@media实现IE hack的方法,css 兼容ie,解决火狐、谷歌兼容问题

列如:

仅IE6和IE7识别

 @media screen\9 {

          .el-form-item__label {

              position: relative;

  }
    }

仅IE8识别

 @media \0screen { 

          .el-form-item__label {

              position: relative;

  }
   }

仅IE6和IE7、IE8识别

 @media \0screen\,screen\9 {   

         .el-form-item__label {

              position: relative;

  }
  }

仅IE9和IE10识别

@media screen and (min-width:0\0) { 

             .el-form-item__label {

                  position: relative;

      }
      } 

仅IE10识别

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {

              .el-form-item__label {

                  position: relative;

      }
       }

仅IE8-10识别

@media screen\0 { 

              .el-form-item__label {

                  position: relative;

      }
        } 

仅支持谷歌

 @media screen and (-webkit-min-device-pixel-ratio:0) {

           .el-form-item__label {

              position: relative;

  }
   }

仅支持火狐

 @-moz-document url-prefix() {

         .el-form-item__label {

              position: relative;

  }
     }

你可能感兴趣的:(css,javascript,vue.js)