从按钮中删除边框 [英] Remove border from buttons

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

问题描述

我尝试创建按钮并插入我自己的图片,而不是标准的按钮图片。但是,标准按钮的灰色边框仍然保留,显示在我的黑色按钮图像的外侧。

I tried to create buttons and insert my own images instead of the standard button images. However, the gray border from the standard buttons still remains, showing on the outside of my black button images.

有人知道如何从按钮中删除此灰色边框,因此它只是图像本身?谢谢。

Does anyone know how to remove this gray border from the button, so it's just the image itself? Thank you.

推荐答案

添加

padding: 0;
border: none;
background: none;

。我只是使用Chrome的开发工具,它的工作。

to your buttons. I Just did it with Chrome's dev tools and it worked.

编辑

http://jsfiddle.net/Vestride/dkr9b/

)。我添加了一些CSS按钮的小提琴,看起来几乎完全一样的图像。

I do suggest, however, that you use pure CSS for your buttons instead of those images because because they're so simple and and the CSS is scalable (will look way better on retina displays). I've added some CSS buttons to the fiddle that look almost exactly like the images.

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

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