如何在没有源的情况下删除图像周围的边框? [英] How can I remove the border around an image without a source?

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

问题描述

我有一个图像,我还没有定义源。它有边框:/

I have an image, and I haven't defined the source yet. It has a border :/

例如:< img src =/>

如果我给它一个源,边框消失(由于css: border:none )。

If I give it a source, the border goes away (due to the css: border:none).

如果没有源图像,如何清除图像周围的边框?

How can I remove the border around an image when it doesn't have a source?

推荐答案

您不能是浏览器的默认值,最好只是添加在src或没有图像标签,或将其宽度/高度设置为0,除非有一个src可用。您也可以使用透明图片作为占位符。

You can't it is a default from the browser, best to just add in the src or not have the image tag, or set its width/height to 0 unless there is a src available. You could also use a transparent image as a placeholder as well.

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

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