div+css实现立体凹凸圆形按钮点击效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css实现立体凹凸圆形按钮点击效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" /> <style> body{ padding: 200px; } .toggle { display: inline-block; } .toggle { position: relative; height: 100px; width: 100px; } .toggle:before { box-shadow: 0; border-radius: 84.5px; background: #fff; position: absolute; margin-left: -36px; margin-top: -36px; opacity: 0.2; height: 72px; width: 72px; left: 50%; top: 50%; } .toogle input:checked~.label { color: rgba(255,0,0,0.8); } .toggle .button { transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1); box-shadow: 0 15px 25px -4px rgba(0, 0, 0, 0.5), inset 0 -3px 4px -1px rgba(0, 0, 0, 0.2), 0 -10px 15px -1px rgba(255, 255, 255, 0.6), inset 0 3px 4px -1px rgba(255, 255, 255, 0.2), inset 0 0 5px 1px rgba(255, 255, 255, 0.8), inset 0 20px 30px 0 rgba(255, 255, 255, 0.2); border-radius: 68.8px; position: absolute; background: #eaeaea; margin-left: -34.4px; margin-top: -34.4px; display: block; height: 68.8px; width: 68.8px; left: 50%; top: 50%; } .toggle .label { transition: color 300ms ease-out; line-height: 101px; text-align: center; position: abs.........完整代码请登录后点击上方下载按钮下载查看
网友评论0