div+css布局实现顶部导航条消息通知点击下拉显示消息列表效果代码

代码语言:html

所属分类:菜单导航

代码描述:div+css布局实现顶部导航条消息通知点击下拉显示消息列表效果代码

代码标签: div css 顶部 导航条 消息 通知 点击 下拉 显示 消息 列表

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

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  
  
  
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Oxygen:wght@700&family=Work+Sans:wght@300;500&display=swap");
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: "Work Sans", sans-serif !important;
	background-color: #f2f8ff;
	color: #333;
}

.header {
	padding: 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #fff;
	position: fixed;
	width: calc(100% - 250px);
	top: 0;
	left: 250px;
	z-index: 1000;
	min-height: 70px;
	box-shadow: 0 5px 20px -17px rgba(0, 0, 0, 0.34);
}

.sidebar {
	max-height: 70px;
	background: #030110;
	height: 100vh;
	position: fixed;
	width: 250px;
}

.bell-con {
	color: #030110;
}

.notification-icon {
	display: flex;
	position: relative;
	cursor: pointer;
	justify-content: center;
	align-items: center;
	background: rgba(0, 0, 0, 0.03);
	padding: 10px;
	border-radius: 60%;
}

.notification-tray {
	display: none;
	position: absolute;
	right: 20px;
	top: 90px;
	background-color: #fff;
	box-shadow: 0 5px 20px -17px rgba(0, 0, 0, 0.34);
	width: 300px;
	max-height: 350px;
	z-index: 100;
	overflow-y: auto;
}

.notification-header {
	padding: 10px;
	background: rgb(221 232 243);
}

.notification-item {
	padding: 10px;
	display: flex;
	align-items: center;
	gap: 5px;
	border-bottom: 1px solid #eee;
	cursor: pointer;
}

box-icon {
	margin-left: 5px;
}

.notification-conten.........完整代码请登录后点击上方下载按钮下载查看

网友评论0