如何编辑表单上提交按钮的大小? [英] How to edit the size of the submit button on a form?
本文介绍了如何编辑表单上提交按钮的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好我不想为我的提交按钮提供图片,因此我已经使用了默认提交按钮,但是我想编辑它的宽度和高度。
< input type =submitid =searchvalue =Search/> gt ;
谢谢!
James
解决方案
使用CSS,您可以使用id(#)选择器为特定按钮设置样式:
#search {
width:20em;身高:2em;
}
或者您希望所有提交按钮都是特定大小:
input [type = submit] {
width:20em;身高:2em;
$ / code>
或者如果您希望某些类别的按钮是您可以使用的特定样式CSS类:
< input type =submitid =searchvalue =Searchclass =search />
和
input.search {
width:20em;身高:2em;
}
我使用ems作为度量单位,因为它们倾向于更好地扩展。
Hi I don't want an image for my submit button so I have gone with the default submit button but I want to edit its width and height. How do I do that?
<input type="submit" id="search" value="Search" />
Thanks!
James
解决方案
Using CSS you can set a style for that specific button using the id (#) selector:
#search {
width: 20em; height: 2em;
}
or if you want all submit buttons to be a particular size:
input[type=submit] {
width: 20em; height: 2em;
}
or if you want certain classes of button to be a particular style you can use CSS classes:
<input type="submit" id="search" value="Search" class="search" />
and
input.search {
width: 20em; height: 2em;
}
I use ems as the measurement unit because they tend to scale better.
这篇关于如何编辑表单上提交按钮的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文