你可以用css格式化html表单按钮吗?

前端之家收集整理的这篇文章主要介绍了你可以用css格式化html表单按钮吗?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我不喜欢默认的按钮样式。这真的很无聊。我在用
<input type="submit">

类型按钮。我可以在css中这些不知何故样式?如果不是,另一种方法,我猜是将使用一个div,并使它成为一个链接。你如何让他们使用表单?

解决方法

你可以通过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

原文链接:https://www.f2er.com/css/220306.html

猜你在找的CSS相关文章