js+css实现简洁消息提醒弹出层效果代码

代码语言:html

所属分类:弹出层

代码描述:js+css实现简洁消息提醒弹出层效果代码

代码标签: js 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/iconoir.min.css">
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Oxygen:wght@700&family=Work+Sans:wght@300;500&display=swap");

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

.notification-area {
	position: fixed;
	top: 10px;
	padding: 10px;
	right: 10px;
	width: 350px;
	z-index: 1000;
	max-height: 80%;
	overflow-y: auto;
}

.notification-item {
	backdrop-filter: blur(7px);
	background-color: rgb(66 66 69/70%);
	box-shadow: inset 0 0 1px rgb(232 232 237/11%);
	color: rgb(245, 245, 247);
	display: flex;
	will-change: transform;
	z-index: 1;
	transition: linear 250ms;
	border-radius: 7px;
	padding: 15px;
	margin-bottom: 10px;
	font-family: "Work Sans", sans-serif !important;
	align-items: center;
}

.notification-item[data-type="banner"]:hover {
	opacity: 0.9; /* Slight interactive effect on hover for banners */
}

.notification-title {
	font-size: 14px;
	font-weight: bold;
	margin-right: 8px;
	margin-bottom: 4px;
}

.notification-body {
	font-size: 12px;
	opacity: 0.8;
}

.notification-options {
	cursor: pointer;
	user-select: none;
	font-size: 12px;
	color: rgb(245, 245, 247);
	margin-left: auto;
}

.notification-options:hover {
	text-decoration: underline;
}

/* Custom scrollbar for the notification area */
.notification-area::-webkit-scrollbar {
	width: 6px;
}

.notification-app-name {
	font-size: 10p.........完整代码请登录后点击上方下载按钮下载查看

网友评论0