这是我想要添加的图像,但当我在网站上显示它时,它会变成一个带有边框的图像:Button with border (按钮后面有一个背景)。我将javascript与reactjs、html和css结合使用。
下面是我用来显示图片的代码:
css代码:code
js代码:enter image description here
如何在没有此边框的情况下显示此图像?我尝试放入css文件边框: 0;边距: 0;填充:0;边框:无;但都不起作用
发布于 2019-10-19 22:44:56
试试border-style: none;。你的问题不是很简洁,但它应该是可行的。我想..。您可能应该添加更多细节
但说真的,我永远不会用图片代替按钮。改为执行以下操作:
button {
height: 50px;
width: 200px;
padding: 5px 10px 5px 10px;
background-color: white;
font-size: 30px;
border: 2px solid black;
border-radius: 40px;
}<button onclick="">Contato</button>
https://stackoverflow.com/questions/58464811
复制相似问题