自适应后台dashboard仪表盘效果

代码语言: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/bootstrap.3.3.4.css">
<link rel='stylesheet' href='http://repo.bfw.wiki/bfwrepo/css/material-icons.min.css'>
<link type="text/css" rel="stylesheet" href="http://repo.bfw.wiki/bfwrepo/css/chartist.min.css">

<style>
html {
  font-size: 62.5%;
}

body {
  margin: 0;
  padding: 0;
}

.backdrop {
  background: rgba(0, 0, 0, 0.6);
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  min-height: 100%;
  z-index: 1;
  display: none;
}

#app {
  position: relative;
  min-height: 100vh;
  background: #eee;
}

.navbar {
  padding: 1rem;
  height: 7rem;
}

.sidebar {
  box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  background-image: linear-gradient(to bottom, white 0%, #f6f6f6 47%, rgba(237, 237, 237, 0.8) 85%, rgba(237, 237, 237, 0.5) 100%), url("http://repo.bfw.wiki/bfwrepo/image/5e323253cf4d2.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: left;
  width: 260px;
  z-index: 2;
}
@media (max-width: 990px) {
  .sidebar {
    transform: translateX(-290px);
  }
}
.sidebar__logo {
  text-transform: uppercase;
  border-bottom: 1px solid #eee;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 0;
  font-size: 1.8rem;
  width: 90%;
}

.nav {
  list-style: none;
  display: flex;
  margin: 2rem auto;
  flex-direction: column;
  overflow: auto;
  width: 90%;
}
.nav__link {
  border-radius: 3px;
  display: flex;
  padding: 1rem 1.5rem;
  margin-bottom: .5rem;
}
.nav__link i {
  color: #888888;
  font-size: 2.4rem;
  width: 30px;
  margin-right: 15px;
}
.nav__link p {
  align-self: center;
  margin: 0;
  color: #555555;
  font-size: 1.4rem;
}
.nav__link:hover, .nav__link--active {
  background: #9c27b0;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(156, 39, 176, 0.4);
  text-decoration: none;
}
.nav__link:hover i, .nav__link:hover p, .nav__link--active i, .nav__link--active p {
  color: #fff;
}

section {
  background: inherit;
  position: relative;
  padding: 3rem 1.5rem;
  float: right;
  min-height: 100vh;
  width: calc(100% - 260px);
}
@media (max-width: 990px) {
  section {
    width: 100%;
  }
}

.row {
  padding: 30px 10px;
}

.card {
  border-radius: 5px;
  margin: 2rem.........完整代码请登录后点击上方下载按钮下载查看

网友评论0