flex和box-shadow一些兼容性问题
html代码
<div class="creative-list">
<a class="creative-list-item">
<div class="item-img">
<img src=""/>
<div class="item-sell"></div>
<div class="patentImg">
<svg class="icon" aria-hidden="true"><use xlink:href="#icon-patent"></use></svg>
<span>专利</span>
</div>
</div>
<div class="item-title">我是标题哈哈哈我是标题哈哈哈我是标题哈哈哈</div>
<div class="item-middle"><span class="type">西洋陶瓷</span><span class="look-num">1人浏览</span></div>
<div class="item-bottom">
<div class="left">
<img src="">
<span class="name" title="ccbb">ccbb</span>
<span class="integral">750</span>
</div>
<div class="right">
<span class="price">1.00</span>
<span class="unit">元</span>
</div>
</div>
</a>
css代码
.creative-list{
width: 100%;
height: auto;
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.creative-list-item{
width: 280px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: 0 0 12px rgba(0, 0, 0, .2);
box-shadow: 0 0 12px rgba(0, 0, 0, .2);
border-radius: 5px;
background: #fff;
cursor: pointer;
margin-right:15px;
margin-bottom: 15px;
color: #000;
overflow: hidden;
}
.creative-list-item:hover{
color: #000;
}
.creative-list-item .item-img{
width: 100%;
height: 200px;
overflow: hidden;
position: relative;
}
.creative-list-item .item-img>img{
width: 100%;
height: 100%;
-webkit-transition: -webkit-transform 0.3s;
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
-webkit-transform: scale(1);
transform: scale(1)
}
.creative-list-item .item-img>img:hover{
-webkit-transform: scale(1.2);
transform: scale(1.2);
}
.creative-list-item .item-img .item-sell{
position: absolute;
top:;
bottom:;
left:;
right:;
border-radius: 5px 5px 0 0;
display: block;
height: 200px;
background: #000;
background: url(/static/img/design/yishouchu.png) 50% no-repeat rgba(0, 0, 0, .5);
filter: alpha(opacity=50);
opacity: .9;
}
.creative-list-item .item-img .patentImg{
position: absolute;
top:;
left:;
width: 60px;
height: 30px;
z-index: 999px;
font-size: 12px;
color: #fff;
background-color: #fc4147;
border-radius: 5px 0 12px 0;
}
.item-img .patentImg .icon{
width: 18px;
height: 18px;
fill: currentColor;
display: inline-block;
overflow: hidden;
color: #fff;
margin: 6px 5px;
}
.item-img .patentImg span {
position: absolute;
font-weight: lighter;
top: 6px;
}
.creative-list-item .item-title{
padding:0 15px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top:20px;
color: #000;
}
.creative-list-item .item-middle {
margin-top: 15px;
padding:0 15px;
font-size: 12px;
color: #999;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.item-middle .type{
background-color: #e5e5e5;
margin-right: 10px;
display: inline-block;
padding: 2px 4px;
border-radius: 8px;
}
.item-middle .look-num{
vertical-align: middle;
}
.creative-list-item .item-bottom{
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding:0 15px;
margin:15px 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.item-bottom img{
margin-right: 5px;
height: 30px;
width: 30px;
border-radius: 50%;
}
.item-bottom .left{
-webkit-box-flex:;
-ms-flex:;
flex:;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.item-bottom .name{
margin-right: 5px;
font-size: 14px;
color: #333;
cursor: pointer;
max-width: 100px;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-bottom .integral{
background-color: #fcba07;
border-radius: 8px;
font-size: 12px;
color: #fff;
display: inline-block;
padding: 0 4px;
}
.item-bottom .right{
float: right;
}
.item-bottom .right .price{
color: #ff6000;
font-size: 18px;
}
.item-bottom .right .unit{
color: #ff6000;
font-size: 12px;
}
ie11以上 显示正常 效果如下

ie11以下 效果如下

原因 :列表遍历 我这边用的是a标签,ie11以下就不兼容了,只需要给a标签加个属性display:block; 将其变成块级元素即可。可以兼容到ie7
flex和box-shadow一些兼容性问题的更多相关文章
- display:flex和display:box布局浏览器兼容性分析
display:flex和display:box都可用于弹性布局,不同的是display:box是2009年的命名,已经过时,用的时候需要加上前缀:display:flex是2012年之后的命名.在实 ...
- flex和box兼容性写法
display: -webkit-box; /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */ display: -moz-box; /* Firefox 17- ...
- 如何设置box shadow的透明度
(从已经死了一次又一次终于挂掉的百度空间人工抢救出来的,发表日期2014-04-24) 今天发现使用box-shadow属性,可以很好的给div添加阴影效果,但是添加的效果如果是: -moz-box- ...
- 分享div、text、Box Shadow(阴影)演示及代码的页面
附图: 直接上链接:www.css88.com/tool/css3Preview/Box-Shadow.html
- CSS3新特性,兼容性,兼容方法总结
css3手册css3手册 边框 border-radius 用于添加圆角效果 语法: border-radius:[ <length> | <percentage> ]{1,4 ...
- flexbox布局的兼容性
http://ayqy.net/blog/flexbox布局的兼容性/ 写在前面 flex布局早在2009年就有了,而现在是2015年6月8日,使用最新的flex语法会发现支持程度并不好,即使是在“高 ...
- Flex弹性布局在移动设备上的应用
引文 首先,我们有表格布局.当不考虑语义并且利用一些适当的嵌套和其他技巧,我们可以用table建立具有一定功能的布局. 然后是现在大多数人都在使用的浮动布局.我们可以使用任何我们想用的元素,但浮动并不 ...
- CSS3弹性伸缩布局(二)——flex布局
上一篇博客<CSS3弹性伸缩布局(一)——box布局>介绍了旧版本的box布局,而这篇博客将主要介绍最新版本的flex布局的基础知识. 新版本简介 新版本的Flexbox模型是2012年9 ...
- 67.web--手机端兼容性问题
H5页面窗口自动调整到设备宽度,并禁止用户缩放页面 <meta name="viewport" content="width=device-width,initia ...
- CSS魔法堂:Flex布局
前言 Flex是Flexible Box的缩写,就是「弹性布局」.从2012年已经面世,但由于工作环境的原因一直没有详细了解.最近工作忙到头晕脑胀,是要学点新东西刺激一下大脑,打打鸡血. Flex就 ...
随机推荐
- 针对Web应用的【攻击模式篇】
攻击模式:主动攻击.被动攻击. 主动攻击是指攻击者通过直接访问Web应用,把攻击代码传入的攻击模式. 具有代表性的攻击:SQL注入攻击和OS命令注入攻击. 被动攻击是指利用圈套策略执行攻击代码的攻击模 ...
- mysql 的 select into 带来的错误数据问题
在写存储过程的时候,会有一个被忽视的问题: 比如 select user_name into @user_name from user where id = 1; 会出现 其实没有 id =1 这条数 ...
- [Selenium] 在Chrome的开发者工具中验证检查XPath/CSS selectors
Evaluate and validate XPath/CSS selectors in Chrome Developer Tools Method 1 : From Elements panel U ...
- jquery 表单校验
<link type="text/css" href="<%=basepath%>css/form/validate.css" rel=&qu ...
- Netsharp配置文件
一.总体说明 netsharp下需要配置的项目一般是需要独立启动的项目,主要有四个 netsharp-web netsharp-test netsharp-elephant netsharp-donk ...
- 3.在自己的bag上运行Cartographer ROS
1.验证自己的bag cartographer ROS提供了一个工具cartographer_rosbag_validate来自动分析包中的数据.在尝试调试cartographer之前运行这个工具. ...
- 开启hadoop集群
首先开启zookeeper zkServer.sh start start-all
- modal 永久移除遮盖层
样式中直接加入: .modal-backdrop { opacity: 0 !important; filter: alpha(opacity=0) !important;}
- 第一个Python小爬虫
这个爬虫是参考http://python.jobbole.com/81353/这篇文章写的 这篇文章可能年代过于久远,所以有些代码会报错,然后我自己稍微修改了一下,增加了一个getContentAll ...
- 关于esp32的系统初始化启动过程及设计学习方法
对于esp32,其开发程序中有且只能有一个app_main函数,该函数是用户程序的入口,这在没有调用FreeRTOS的系统中相当于函数main,但其实在app_main之前,系统还有一段初始化的过程, ...