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

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

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

解决方法

你可以通过CSS轻松实现你想要的通过: –

HTML

  1. <input type="submit" name="submit" value="Submit Application" id="submit" />

CSS

  1. #submit {
  2. background-color: #ccc;
  3. -moz-border-radius: 5px;
  4. -webkit-border-radius: 5px;
  5. border-radius:6px;
  6. color: #fff;
  7. font-family: 'Oswald';
  8. font-size: 20px;
  9. text-decoration: none;
  10. cursor: pointer;
  11. border:none;
  12. }
  13.  
  14.  
  15.  
  16. #submit:hover {
  17. border: none;
  18. background:red;
  19. Box-shadow: 0px 0px 1px #777;
  20. }

DEMO

猜你在找的CSS相关文章