h5 [type=search] 时
input::-webkit-search-cancel-button {
display: none;
} //去掉默认清空按钮
有背景或图片子元素的容器中定位在边界的子元素可能会距边界有条细线,原因可能是父级写了overflow: hidden
background-size: cover
兼容ie9
background: none\9;
/*下一行为关键设置*/
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='//s.qunarzz.com/travel/web/check.png', sizingMethod='scale'); //scale 就是覆盖
bfc 块级格式化上下文: 一个独立的布局环境,其中的元素布局是不受外界的影响,容器里面的子元素不会影响到外面的元素。
满足一下任意条件即为bfc:
1、float的值不是none。
2、position的值不是static或者relative。
3、display的值是inline-block、table-cell、flex、table-caption或者inline-flex
4、overflow的值不是visible
作用:清除浮动,避免margin重叠
# 透明底效果背景图
background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%),
linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%);
background-size: 16px 16px;
background-position: 0 0, 8px 8px;
background-color: #fff;