canvas教程

干货分享 超炫丽的HTML5/jQuery应用及代码(6)

字号+ 作者:H5之家 来源:H5之家 2017-03-15 16:01 我要评论( )

核心CSS代码: body { background : #2d3b36 url(Blurry-city-lights1337.jpg)no-repeat center center fixed ; -webkit-background-size : cover ; -moz-background-size : cover ; -o-background-size : cover ;

核心CSS代码:

body { background:#2d3b36 url(Blurry-city-lights1337.jpg)no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; padding-top:20px; } form { margin-left:auto; margin-right:auto; width: 343px; height: 333px; padding:30px; border: 1px solid rgba(0,0,0,.2); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; background: rgba(0, 0, 0, 0.5); -moz-box-shadow: 0 0 13px 3px rgba(0,0,0,.5); -webkit-box-shadow: 0 0 13px 3px rgba(0,0,0,.5); box-shadow: 0 0 13px 3px rgba(0,0,0,.5); overflow: hidden; } textarea{ background: rgba(255, 255, 255, 0.4) url() no-repeat scroll 16px 16px; width: 276px; height: 110px; border: 1px solid rgba(255,255,255,.6); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; display:block; font-family: 'Source Sans Pro', sans-serif; font-size:18px; color:#fff; padding-left:45px; padding-right:20px; padding-top:12px; margin-bottom:20px; overflow:hidden; } input { width: 276px; height: 48px; border: 1px solid rgba(255,255,255,.4); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; display:block; font-family: 'Source Sans Pro', sans-serif; font-size:18px; color:#fff; padding-left:20px; padding-right:20px; margin-bottom:20px; } input[type=submit] { cursor:pointer; } input.name { background: rgba(255, 255, 255, 0.4) url() no-repeat scroll 16px 16px; padding-left:45px; } input.email { background: rgba(255, 255, 255, 0.4) url() no-repeat scroll 16px 20px; padding-left:45px; } input.message { background: rgba(255, 255, 255, 0.4) url() no-repeat scroll 16px 16px; padding-left:45px; } ::-webkit-input-placeholder { color: #fff; } :-moz-placeholder{ color: #fff; } ::-moz-placeholder { color: #fff; } :-ms-input-placeholder { color: #fff; } input:focus, textarea:focus { background-color: rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 5px 1px rgba(255,255,255,.5); -webkit-box-shadow: 0 0 5px 1px rgba(255,255,255,.5); box-shadow: 0 0 5px 1px rgba(255,255,255,.5); overflow: hidden; } .btn { width: 138px; height: 44px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; float:right; border: 1px solid #253737; background: #416b68; background: -webkit-gradient(linear, left top, left bottom, from(#6da5a3), to(#416b68)); background: -webkit-linear-gradient(top, #6da5a3, #416b68); background: -moz-linear-gradient(top, #6da5a3, #416b68); background: -ms-linear-gradient(top, #6da5a3, #416b68); background: -o-linear-gradient(top, #6da5a3, #416b68); background-image: -ms-linear-gradient(top, #6da5a3 0%, #416b68 100%); padding: 10.5px 21px; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: rgba(255,255,255,0.1) 0 1px 0, inset rgba(255,255,255,0.7) 0 1px 0; -moz-box-shadow: rgba(255,255,255,0.1) 0 1px 0, inset rgba(255,255,255,0.7) 0 1px 0; box-shadow: rgba(255,255,255,0.1) 0 1px 0, inset rgba(255,255,255,0.7) 0 1px 0; text-shadow: #333333 0 1px 0; color: #e1e1e1; } .btn:hover { border: 1px solid #253737; text-shadow: #333333 0 1px 0; background: #416b68; background: -webkit-gradient(linear, left top, left bottom, from(#77b2b0), to(#416b68)); background: -webkit-linear-gradient(top, #77b2b0, #416b68); background: -moz-linear-gradient(top, #77b2b0, #416b68); background: -ms-linear-gradient(top, #77b2b0, #416b68); background: -o-linear-gradient(top, #77b2b0, #416b68); background-image: -ms-linear-gradient(top, #77b2b0 0%, #416b68 100%); color: #fff; } .btn:active { margin-top:1px; text-shadow: #333333 0 -1px 0; border: 1px solid #253737; background: #6da5a3; background: -webkit-gradient(linear, left top, left bottom, from(#416b68), to(#416b68)); background: -webkit-linear-gradient(top, #416b68, #609391); background: -moz-linear-gradient(top, #416b68, #6da5a3); background: -ms-linear-gradient(top, #416b68, #6da5a3); background: -o-linear-gradient(top, #416b68, #6da5a3); background-image: -ms-linear-gradient(top, #416b68 0%, #6da5a3 100%); color: #fff; -webkit-box-shadow: rgba(255,255,255,0) 0 1px 0, inset rgba(255,255,255,0.7) 0 1px 0; -moz-box-shadow: rgba(255,255,255,0) 0 1px 0, inset rgba(255,255,255,0.7) 0 1px 0; box-shadow: rgba(255,255,255,0) 0 1px 0, inset rgba(255,255,255,0.7) 0 1px 0; } View Code

css3-transparent-contact-form

在线演示 源码下载



 

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
  • jQuery学习笔记:extend

    jQuery学习笔记:extend

    2017-03-04 11:00

  • jQuery+Canvas 简易画板

    jQuery+Canvas 简易画板

    2017-02-27 11:00

  • jQuery + Canvas 伸缩旋转方块

    jQuery + Canvas 伸缩旋转方块

    2017-02-26 08:05

  • jQuery + Canvas 旋转的时钟

    jQuery + Canvas 旋转的时钟

    2017-02-25 18:02

网友点评