纯css实现多个不同尺寸电池效果
代码语言:html
所属分类:布局界面
代码描述:纯css实现多个不同尺寸电池效果
下面为部分代码预览,完整代码请点击下载或在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/animate.min.css"> <style> body { margin: auto; display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; -webkit-box-pack: center; justify-content: center; height: 100vh; background-image: -webkit-gradient(linear, left bottom, left top, from(#444444), color-stop(#4444448f), to(#444444)); background-image: linear-gradient(0deg, #444444, #4444448f, #444444); } .battery-container { display: -webkit-box; display: flex; -webkit-box-align: baseline; align-items: baseline; } .type, .voltage { position: absolute; width: 100%; opacity: 0; -webkit-transition: opacity 0.4s ease-in-out; transition: opacity 0.4s ease-in-out; text-align: center; font-size: 14px; } .voltage { bottom: 115%; } .type { top: 110%; } .battery { position: relative; margin: 0 30px; background-image: linear-gradient(45deg, #232222, #606060); border-radius: 3px; box-shadow: 0px -16px 2px -14px #eeeeee, 0px -15px 0px -12px #dcdcdc; -webki.........完整代码请登录后点击上方下载按钮下载查看
网友评论0