css布局显示有一个相册

代码语言:html

所属分类:布局界面

代码描述:css布局显示有一个相册

代码标签: 有一个 相册

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&display=swap");

* {
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

body {
	background: #1d3557;
	font-family: "Roboto", sans-serif;
	height: 100vh;
	display: flex;
}

ul {
	list-style: none;
}

.hero-container {
	background: #fff;
	width: 800px;
	max-height: 100%;
	margin: auto;
	border-radius: 10px;
	display: flex;
	position: relative;
}

.navbar-container {
	width: 90px;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.navbar__items-list {
	height: 370px;
	border-right: 1px solid #dedede;
	margin-top: 30px;
}

.navbar__item {
	display: flex;
	align-items: center;
	width: 90px;
	padding: 0 30px;
	margin: 30px 0;
}

.navbar__item.logo {
	fill: #6d8df0;
	margin-top: 0;
	margin-bottom: 60px;
}

.navbar__item:hover:not(.logo) svg {
	fill: #6d8df0;
}

.navbar__item a:focus svg {
	fill: #6d8df0;
}

.navbar__item:hover:not(.logo) {
	border-right: 3px solid #6d8df0;
}

.navbar__item:not(.logo) svg {
	fill: #dedede;
}

.navbar__user-avatar img {
	width: 45px;
	height: 45px;
	border-radius: 50%;
	border: 2px solid #6d8df0;
	margin: 30px;
	position: absolute;
	bottom: 0;
}

.content-container {
	height: 100%;
	width: 100%;
	padding: 30px 40px;
}

.content__image-count {
	color: #bfbfbf;
	font-weight: 500;
}

.content__album-header {
	margin: 30px 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.content__album-title {
	font-size: 3rem;
}

.content__more-btn {
	cursor: pointer;
	color: #6d8df0;
	background: #fff;
	padding: 10px 40px;
	border: 1px solid #6d8df0;
	font-size: 0.9rem;
	font-weight: 700;
	text-transform: uppercase;
	transition: box-shadow 0.2s ease-in-out;
}

.content__more-btn:hover {
	box-shadow: inset 0 0 0 1px #6d8df0;
}

.content__gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0