css实现带背景的手风琴图文效果代码

代码语言:html

所属分类:其他

代码描述:css实现带背景的手风琴图文效果代码

代码标签: css 背景 手风琴 图文

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

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

<head>

  <meta charset="UTF-8">
  

  <meta name="viewport" content="width=device-width, initial-scale=1">

<link href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap" rel="stylesheet">
  
  
  
<style>
*:not(head),
*::before,
*::after {
	box-sizing: border-box;
}

:root {
	--theme: linear-gradient(
		135deg,
		#5e4f30bb,
		#615233bb,
		#6b5a3abb,
		#796746bb,
		#8b7754bb,
		#a08a65bb,
		#b69d77bb,
		#ccb089bb,
		#e0c299bb,
		#f0d1a7bb,
		#fbdab0bb,
		#ffdeb3bb
	);
}

body::-webkit-scrollbar {
	width: 20px;
}

body::-webkit-scrollbar-track {
	background: black;
}

body::-webkit-scrollbar-thumb {
	background: #ffdeb3bb;
}

body::-webkit-scrollbar-thumb:hover {
	background: #ffdeb355;
}

body::-webkit-scrollbar-thumb:active {
	background: #444;
}

body,
html {
	-webkit-text-size-adjust: 100%;
	-webkit-tap-highlight-color: transparent;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	background: black;
}

body {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	min-height: 100vh;
	margin: 0;
}

main a,
main a::before,
main a::after,
main a:hover::before,
main a:hover::after,
main a:hover {
	text-decoration: none;
	transition: all 0.3s ease-in-out;
}

main a:hover {
	cursor: pointer;
}

main a:active {
	transform: translateY(3px) scale(0.95);
	color: inherit;
	transition: unset !important;
}

main,
main ul,
main li,
main p,
main a,
main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
	font-family: "Atkinson Hyperlegible", sans-serif;
}

#mzb-accordion {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: auto;
	max-width: 1300px;
	padding: 40px;
	background: var(--theme);
	margin: 40px 0px;
	border-radius: 20px;
}

#mzb-accordion input {
	display: none;
}

#mzb-accordion ul {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	width: 100%;
	height: auto;
	padding: unset;
}

#mzb-accordion ul li {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: auto;
	margin-bottom: 0px;
	border-bottom: 2px solid white;
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	padding: 20px;
	z-index: 1;
	transition: all 0.7s ease-in-out;
}

#mzb-accordion ul li:nth-child(1) {
	background: url("//repo.bfw.wiki/bfwrepo/image/62633bb0f2947.png");
	border-radius: 20px 20px 0 0;
}

#mzb-accordion ul li:nth-child(2) {
	background: url("//repo.bfw.wiki/bfwrepo/image/615643e481963.png");
}

#mzb-accordion ul li:nth-child(3) {
	background: url("//repo.bfw.wiki/bfwrepo/i.........完整代码请登录后点击上方下载按钮下载查看

网友评论0