你可以用css格式化html表单按钮吗? [英] Can you style html form buttons with css?

查看:70
本文介绍了你可以用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;
}

DEMO

这篇关于你可以用css格式化html表单按钮吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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