html中img标签显示图片属性写法与background差异
.liuxijun{
border: none;
width: 150px;
height: 150px;
background: url(../images/1.jpg) no-repeat 0 0;
background-size: cover;
}
img都会有一个默认1px边框。
img标签属性写法:在标签中书写width\height\src,不留有1px边框
原创
2016-12-08 11:19:38 ·
3393 阅读 ·
0 评论