css+svg实现可伸缩弹出子菜单效果代码

代码语言:html

所属分类:菜单导航

代码描述:css+svg实现可伸缩弹出子菜单效果代码

代码标签: css svg 伸缩 弹出 子菜单

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

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

<head>
  <meta charset="UTF-8">
  


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

* {
	margin: 0;
	padding: 0;
}
body {
	font-family: sans-serif;
	background: #2f2e34;
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
	font-family: "Inter", sans-serif;
}

button {
	background: none;
	border: none;
}

#button-container button svg {
	transition: transform 1s ease;
}

#button-container,
#button-container span,
#button-container button {
	display: flex;
	white-space: nowrap;
	gap: 1px;
	align-items: center;
	cursor: pointer;
	font-style: normal;
	font-weight: 500;
	font-size: 16px;
	color: #c7c7c7;
}

#button-container {
	color: #c7c7c7;
	height: 40px;
	background: rgba(255, 255, 255, 0.03);
	width: 300px;
	border: 2px solid #a5a5a5;
	border-radius: 12px;
	padding: 0px 16px;
	overflow: hidden;
	transition: width 1s ease;
	cursor: pointer;
}

#button-container > svg,
#button-container span {
	border-left: 2px solid rgba(255, 255, 255, 0.1);
	padding: 5px;
	height: 100%;
}

#button-container.mini.........完整代码请登录后点击上方下载按钮下载查看

网友评论0