如何删除图像边框? [英] How to remove border around images?

查看:104
本文介绍了如何删除图像边框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名手机开发人员,在我的应用程序中为一些HTML作品苦苦挣扎。它看起来很容易,但我无法弄清楚:

 < html> 
< body>
< img src =http://www.reactiongifs.com/r/iwsyih.gif/>
< / body>
< / html>

图片上出现一个白色边框,但我不希望发生这种情况。如何删除它?谢谢

解决方案

它是 body 元素的默认填充/边距。这是'CSS重置'的目的。只需将它添加到您的样式中即可:

  body {margin:0; padding:0;} 


I'm a mobile developer struggling with some HTML works in my app. It looks too easy but I couldn't figure it out:

<html>
    <body>
        <img src="http://www.reactiongifs.com/r/iwsyih.gif"/>
    </body>
</html>

a white border around image appears but I don't want that happen. how to remove it? thanks

解决方案

It's the default padding/margin on the body element. That's the purpose of a 'CSS reset'. Just add this to your styles:

body {margin: 0; padding: 0;}

这篇关于如何删除图像边框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆