function tab(){
	/* 获取元素 */
	let tab_1 = document.querySelector('#Plantation_Landscape');
	let tab_2 = document.querySelector('#Fishing_Garden_Scenery');
	let btn1 = document.querySelector('.btn1');
	let btn2 = document.querySelector('.btn2');
	let nav_1 = document.querySelector('.nav_1');
	let nav_2 = document.querySelector('.nav_2');
	let cot = document.getElementById('content');
	
	/* 事件注册 */
	
	btn1.addEventListener('click', (e) => {
		btn1.style.cssText = "width:30px;height:30px;left:1%;";
		btn2.style.cssText = "width:20px;height:20px;left:9%;";
		tab_1.style.display = "block";
		tab_2.style.display = "none";
		nav_1.style.color = "#06cd5b";
		nav_2.style.color = "#007130";
		cot.style.background = "url(./img/tree.jpg) no-repeat center";
	})
	
	btn2.addEventListener('click', (e) => {
		btn2.style.cssText = "width:30px;height:30px;left:1%;";
		btn1.style.cssText = "width:20px;height:20px;left:9%;";
		tab_1.style.display = "none";
		tab_2.style.display = "block";
		nav_2.style.color = "#06cd5b";
		nav_1.style.color = "#007130";
		cot.style.background = "url(./img/fruit.jpg) no-repeat center";
	})
	
	nav_1.addEventListener('click', (e) => {
		btn1.style.cssText = "width:30px;height:30px;left:1%;";
		btn2.style.cssText = "width:20px;height:20px;left:9%;";
		tab_1.style.display = "block";
		tab_2.style.display = "none";
		nav_1.style.color = "#06cd5b";
		nav_2.style.color = "#007130";
		cot.style.background = "url(./img/tree.jpg) no-repeat center";
	})
	
	nav_2.addEventListener('click', (e) => {
		btn2.style.cssText = "width:30px;height:30px;left:1%;";
		btn1.style.cssText = "width:20px;height:20px;left:9%;";
		tab_1.style.display = "none";
		tab_2.style.display = "block";
		nav_2.style.color = "#06cd5b";
		nav_1.style.color = "#007130";
		cot.style.background = "url(./img/fruit.jpg) no-repeat center";
	})
}
tab()