css实现按钮点击涟漪波浪波纹动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现按钮点击涟漪波浪波纹动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.3.3.4.css"> <style> body { background: #494A5F; color: #D5D6E2; font-weight: 500; font-size: 1.05em; font-family: "Microsoft YaHei","宋体","Segoe UI", "Lucida Grande", Helvetica, Arial,sans-serif, FreeSans, Arimo; } a { color: rgba(255, 255, 255, 0.6); outline: none; text-decoration: none; -webkit-transition: 0.2s; transition: 0.2s; } a:hover,a:focus { color: #74777b; text-decoration: none; } body, html { font-size: 100%; padding: 0; margin: 0; } .ripple { position: relative; overflow: hidden } .ripple:after { content: ""; background: rgba(255,255,255,0.3); display: block; position: absolute; border-radius: 50%; padding-top: 240%; padding-left: 240%; margin-top: -120%; margin-left: -120%; opacity: 0; transition: all 1s } .ripple:active:after { padding-top: 0; padding-left: 0; margin-top: 0; margin-left: 0; opacity: 1; transition: 0s } </style> </head> <body> <div class="container"> <div class="row"> <div class="col-md-12"> <h2>Check out examples</h2> <h3>Navbar</h3> <nav class="navbar navbar-inverse"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="javascript:void(0);">Brand</a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <li class="active"><a href="javascript:void(0);">Link <span class="sr-only">(current)</span></a></li> <li><a href="javascript:void(0);" class="ripple">Link</a></li> <li class="dropdown"> <a href="javascript:void(0);" class="dropdown-toggle ripple" data-toggle="dropdown" role="button" aria-expanded="false&.........完整代码请登录后点击上方下载按钮下载查看
网友评论0