华为自带浏览器绕坑大法!
来源:互联网 发布:解放军土鳖 知乎 编辑:程序博客网 时间:2024/04/30 14:25
本人前端菜鸟,最近在做移动端网页的时候,使用的是弹性盒布局,在其他浏览器上面都没有问题,但是就是在华为自带浏览器上弹性盒布局不管用,已经试过在前面加webkit,moz,ms前缀,结果都不行
不过现在解决了,希望可以帮到大家下边是 我做的兼容code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>学习项目</title>
<style type="text/css">
.bangdan_top_filter {
width: 100%;
height: 54px;
line-height: 54px;
background-color: #fff;
z-index: 8500;
position: fixed;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: justify;
-moz-justify-content: space-between;
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-box-align: center;
-moz-align-items: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-direction: normal;
-webkit-box-orient: horizontal;
-moz-flex-direction: row;
-webkit-flex-direction: row;
flex-direction: row;
}
.bangdan_top_filter .left_aside, .bangdan_top_filter .right_aside {
padding: 0 18px;
font-size: 16px;
color: #333;
}
.bangdan_top_filter .fee_check_con {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: justify;
-moz-justify-content: space-between;
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-box-flex: 0;
-moz-flex-grow: 0;
-webkit-flex-grow: 0;
flex-grow: 0;
margin: 0 auto;
text-align: center;
line-height: 55px;
}
.bangdan_top_filter .fee_check {
display: none;
width: 144px;
height: 29px;
line-height: 29px;
border-radius: 16px;
border: 1px solid #eb6262;
position: relative;
color: #eb6262;
}
.bangdan_top_filter .fee_check_con span {
width: 75px;
height: 29px;
line-height: 29px;
display: block;
font-size: 16px;
border: 1px solid transparent;
border-radius: 16px;
position: absolute;
top: -1px;
}
.bangdan_top_filter .check {
background-color: #eb6262;
color: #fff;
}
.bangdan_top_filter .pay {
left: -2px;
}
.bangdan_top_filter .free {
right: -2px;
}
</style>
</head>
<body>
<div id="bangdanTopFilter" class="bangdan_top_filter">
<div class="left_aside" id="sort">分类</div>
<div class="fee_check_con">
<div class="fee_check" style="display: block;">
<span class="pay check">付费</span>
<span class="free no_check">免费</span>
</div>
</div>
<div class="right_aside" id="sortType">筛选</div>
</div>
</body>
</html>
除了以上这个问题,华为自带浏览器还不支持fixed,border小于1px,时间戳转日期的格式等等等等,所以想要完全兼容各浏览器的同学,必须要解决华为的坑
- 华为自带浏览器绕坑大法!
- Vue打包后,华为自带浏览器无法访问首页
- 打开自带浏览器
- sencha touch在华为emotion ui 2.0自带浏览器中圆角溢出的bug
- 小米华为手机自带浏览器上传图片提示:没有应用可执行操作
- vue2.0 页面在华为自带浏览器里无法打开。
- 浏览器自带的console
- 浏览器自带的CSS
- 启动系统自带浏览器
- 一次PEDIY---修改Windows自带的calc.exe (OD Switch大法)
- 获得“单击浏览器自带的刷新”
- 塞班自带浏览器下载路径问题
- Android App 调用自带浏览器
- .NET中自带浏览器控件替代品
- Android App 调用自带浏览器
- 去除浏览器自带的提示
- android 启动手机上自带浏览器
- ubuntu自带的终端浏览器:w3m
- 简单背包 记忆化搜索
- 再温暖的鸡汤不如一场殊死的战争,诸神之战四赛区冠军出炉!
- 最简单网络编程之客户端往服务器端送东西03
- React Native 'boost/iterator/iterator_adaptor.hpp' file not found’解决方案
- 69道Spring面试题和答案
- 华为自带浏览器绕坑大法!
- vector<vector<int> >array 理解
- Node.js异步控制流:回调、事件、Promise和async/await
- CSDN转载博客
- Json数据导出Excel(IE10支持)
- bootstrap-table固定表头,同时适配高度,固定列解决方案
- 查询语句中select from where group by having order by的执行顺序
- JDK环境配置
- 如何在eclipse上简历maven项目