点击菜单栏右侧内容区滚动切换效果
html代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>demo</title>
<link rel="stylesheet" href="demo.css">
</head>
<body>
<header>头部</header>
<div class="left-menu">
<div class="menu-item item1 active" data-id="item1">
<a href="#item1">项目1</a>
</div>
<div class="menu-item item2" data-id="item2">
<a href="#item2">项目2</a>
</div>
<div class="menu-item item3" data-id="item3">
<a href