css样式怎么去除图片自带的边框

html-css013

css样式怎么去除图片自带的边框,第1张

要加分哦

img没边框css样式    img{padding:0border:0margin:0display:block}

截取是 比如图片上的边框是1px

.div{background:url(图片地址) 1px 1px width:图片width-2height:图片height-2}

alert("你懂了吗?")

去除a标签中图片的表框,那就直接css中将a标签中的img的border属性设置为0即可,css如下:

a img{border:0}

这样写的意思就是所有a标签下的图片,边框都为0。