你能用 css 设计 html 表单按钮的样式吗? [英] Can you style html form buttons with css?
本文介绍了你能用 css 设计 html 表单按钮的样式吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不喜欢默认的按钮样式.这真的很无聊.我正在使用
I don't like the default button style. It's really boring. I am using
<input type="submit">
键入按钮.我可以在 css 中以某种方式设置这些样式吗?如果没有,我想另一种方法是改用 div,并将其设为链接.你如何使这些与表单一起工作?
type buttons. Can I style these somehow in css? If not, the other way of doing it i guess would be to use a div instead, and make it a link. How do you make those work with forms?
推荐答案
你可以通过 CSS 轻松实现你想要的 :-
You can achieve your desired through easily by CSS :-
HTML
<input type="submit" name="submit" value="Submit Application" id="submit" />
CSS
#submit {
background-color: #ccc;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius:6px;
color: #fff;
font-family: 'Oswald';
font-size: 20px;
text-decoration: none;
cursor: pointer;
border:none;
}
#submit:hover {
border: none;
background:red;
box-shadow: 0px 0px 1px #777;
}
这篇关于你能用 css 设计 html 表单按钮的样式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文