简体   繁体   中英

How to remove the border around the image?

How to remove the border around the square?

How it looks:

屏幕截图

My HTML:

<input id="black" type="image" src="html5-canvas-drawing-app/images/color-swatch-brown.png" onClick="changeColorBlack()">

My CSS:

#black{
border:none;
outline:none;
background:none;
padding:0;
}

要使其消失,请将其厚度设置为0:

border: 0;
border: 0;

放入我的css文件...

For whatever reasons, stylesheets text/css are not very universally-predictable. Still, this should clear you all around:

img#black {
    border: 0px solid #00000;
    padding: 0 0 0 0;
    margin: 0 0 0 0;
}

Toss that in your style.css or whatever. Not all of it may be necessary at the moment, but it will protect you from weird inheritance problems that may arise down the road.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM