凹凸按钮特效
代码语言:html
所属分类:表单美化
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="http://repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #ebf5fc; } ul { position: relative; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; border-radius: 10px; padding: 20px; width: 240px; background: #ebf5fc; box-shadow: -2px -2px 5px white, 3px 3px 5px rgba(0, 0, 0, 0.1); } ul li { position: relative; list-style: none; text-align: center; margin: 15px; } ul li label { position: relative; cursor: pointer; } ul li label input[type="checkbox"] { position: absolute; opacity: 0; } ul li label :checked ~ .icon-box { box-shadow: inset -2px -2px 5px white, inset 3px 3px 5px rgba(0, 0, 0, 0.1); } ul li label :checked ~ .icon-box .fa { transform: scale(0.95); } ul li label .icon-box { width: 60px; height: 60px; background: #ebf5fc; display: flex; justify-content: center; align-items: center; box-shadow: -2px -2px 5px white, 3px 3px 5px rgba(0, 0, 0, 0.1); border-radius: 10px; } ul li label .icon-box .fa { font-size: 30px; color: #6a9bd8; } </style> </head> <body translate="no"> <ul> <li> &l.........完整代码请登录后点击上方下载按钮下载查看
网友评论0