代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
Css
】
css按钮切换效果
作者:
/ 发布于
2016/9/20
/
817
<html> <head> <meta charset="utf-8"> <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/> <title>title</title> <style> .content { padding: 2em 1em 5em; z-index: 1; max-width: 600px; margin: 0 auto; } .content p { margin: 1em 0; padding: 0 0 2em; font-size: 0.85em; } .box { padding: 4.5em 0; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-justify-content: center; justify-content: center; } .bg-3 { background-color:#ccc; color: #fff; } .button { float: left; min-width: 150px; max-width: 250px; display: block; margin:3em; padding: 1em 3em; border: 2px solid #ccc; background:#000; color: inherit; vertical-align: middle; position: relative; z-index: 1; -webkit-backface-visibility: hidden; -moz-osx-font-smoothing: grayscale; } .button:focus { outline: none; } .button > span { vertical-align: middle; font-family:"Helvetica Neue",Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', '微软雅黑', Arial, sans-serif; } .bg-3 .button { color: #fff; border-color: #fff; border-radius: 20px; -webkit-background-clip: padding-box; background-clip: padding-box; } .button--tamaya { overflow: hidden; color: #7986cb; min-width: 180px; } .button--tamaya.button--inverted { color: #37474f; border-color: #37474f; } .button--tamaya::before, .button--tamaya::after { content: attr(data-text); position: absolute; width: 100%; height: 52%;; left: 0; background: #f66705; color: #fff; overflow: hidden; -webkit-transition: -webkit-transform 0.3s; transition: transform 0.3s; -webkit-transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1); transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1); } .bttwo::before, .bttwo::after{ background: #1a72d1; } .btthree::before, .btthree::after{ background: #349e00; } .btfour::before, .btfour::after{ background: #db1205; } .button--tamaya.button--inverted::before, .button--tamaya.button--inverted::after { background: #fff; color: #37474f; } .button--tamaya::before { top: 0; padding-top: 1em; } .button--tamaya::after { bottom: 0; line-height: 0; } .button--tamaya > span { display: block; -webkit-transform: scale3d(0.2, 0.2, 1); transform: scale3d(0.2, 0.2, 1); opacity: 0; -webkit-transition: -webkit-transform 0.3s, opacity 0.3s; transition: transform 0.3s, opacity 0.3s; -webkit-transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1); transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1); } .button--tamaya:hover::before { -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0); } .button--tamaya:hover::after { -webkit-transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0); } .button--tamaya:hover > span { opacity: 1; -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); } </style> </head> <body> <section class="content"> <div class="box bg-3"> <button class="button button--tamaya button--round-s button--text-thick button--border-thin" data-text="界面1"><span>界面1</span></button> <button class="button button--tamaya button--round-s button--text-thick button--border-thin bttwo" data-text="界面2"><span>界面2</span></button> <button class="button button--tamaya button--round-s button--text-thick button--border-thin btthree" data-text="界面3"><span>界面3</span></button> <button class="button button--tamaya button--round-s button--text-thick button--border-thin btfour" data-text="界面4"><span>界面4</span></button> </div> </section> </div> </body> </html>
试试其它关键字
按钮切换
同语言下
.
前端PC-移动端CSS公共样式+HTML
.
手机端页面通用样式
.
H5页面通用头部设置
.
elect默认样式美化代码兼容移动端和pc端
.
按钮效果 css
.
唤醒app
.
放大效果
.
html5+css3实现上拉和下拉刷新
.
html上传图片后,在页面显示上传的图片
.
html5实现点击弹出图片
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
贡献的其它代码
Label
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3