如何让我的< input type ="提交" />一个图像? [英] How can I make my <input type="submit" /> an image?
本文介绍了如何让我的< input type ="提交" />一个图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个漂亮的小CSS图片,需要一个按钮。我试过大约20种不同的方法,没有一个工作。我只是得到一个空白或没有内部的边框。
I have a beautiful little CSS image that needs to be a button. I've tried about 20 different methods, none of which work. I just either get a blank nothing or a border with nothing inside.
html: http://lrroberts0122.github .com / DWS / lab6 / level-2 /
图片: http://lrroberts0122.github.com/DWS/lab6/level-2/images/button.png
CSS: http://lrroberts0122.github.com/DWS/ lab6 / level-2 / css / main.css
由于某些原因我无法将其更改为submit,所以我需要弄清楚如何使这个工作与CSS。感谢您的帮助!
I can't change it to "submit" for certain reasons, so I need to figure out how to make this work with CSS. Thank you for your help!
推荐答案
input[type=submit] {
background: url(http://lrroberts0122.github.com/DWS/lab6/level-2/images/button.png);
border: 0;
display: block;
height: _the_image_height;
width: _the_image_width;
}
这篇关于如何让我的< input type ="提交" />一个图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文