CSS or image for submit button?
What are the advantage and disadvantage of using both?
CSS
<input type="submit" class="removeBtn" /> .removeBtn{ background: url(Images/Remove.png); height: 25px; width: 25px; }
Inline
<input type="image" src="Conten开发者_Go百科t/Images/Remove.png" />
Semantically speaking, you should always use a submit button. A user with a screenreader will have no idea what the function of your image input is.
Edit: as per comments, the image button will automatically submit a form as well as an input with type="submit"
精彩评论