div+css实现响应式自适应后台仪表盘页面代码
代码语言:html
所属分类:响应式
代码描述:div+css实现响应式自适应后台仪表盘页面代码
代码标签: div css 响应式 自适应 后台 仪表盘 页面 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.4.0.css">
<style>
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700;800;900;1000&family=Roboto:wght@300;400;500;700&display=swap");
*,
*::before,
*::after {
box-sizing: border-box;
padding: 0;
margin: 0;
}
nav {
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
}
nav ul,
nav ul li {
outline: 0;
}
nav ul li a {
text-decoration: none;
}
body {
font-family: "Nunito", sans-serif;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background-image: url(//repo.bfw.wiki/bfwrepo/image/64bddc770add3.png);
background-repeat: no-repeat;
background-size: cover;
/* background: #212140; */
}
/* MAIN MENU */
main {
display: grid;
grid-template-columns: 13% 87%;
min-height: 100vh;
width: 100%;
margin: 40px;
background: rgb(254, 254, 254);
box-shadow: 0 0.5px 0 1px rgba(255, 255, 255, 0.23) inset,
0 1px 0 0 rgba(255, 255, 255, 0.66) inset, 0 4px 16px rgba(0, 0, 0, 0.12);
border-radius: 15px;
z-index: 10;
}
.main-menu {
overflow: hidden;
background: rgb(73, 57, 113);
padding-top: 10px;
border-radius: 15px 0 0 15px;
font-family: "Roboto", sans-serif;
}
.main-menu h1 {
display: block;
font-size: 1.5rem;
font-weight: 500;
text-align: center;
margin: 20px 0 30px;
color: #fff;
font-family: "Nunito", sans-serif;
}
.logo {
display: none;
}
.nav-item {
position: relative;
display: block;
}
.nav-item a {
position: relative;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
color: #fff;
font-size: 1rem;
padding: 15px 0;
margin-left: 10px;
border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
}
.nav-item b:nth-child(1) {
position: absolute;
top: -15px;
height: 15px;
width: 100%;
background: #fff;
display: none;
}
.nav-item b:nth-child(1)::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-bottom-right-radius: 20px;
background: rgb(73, 57, 113);
}
.nav-item b:nth-child(2) {
position: absolute;
bottom: -15px;
height: 15px;
width: 100%;
background: #fff;
display: none;
}
.nav-item b:nth-child(2)::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-top-right-radius: 20px;
background: rgb(73, 57, 113);
}
.nav-item.active b:nth-child(1),
.nav-item.active b:nth-child(2) {
display: block;
}
.nav-item.active a {
text-decoration: none;
color: #000;
background: rgb(254, 254, 254);
}
.nav-icon {
width: 60px;
height: 20px;
font-size: 20px;
text-align: center;
}
.nav-text {
display: block;
width: 120px;
height: 20px;
font-family: "Mulish", sans-serif;
}
/* C.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0