今天使用JavaScript写一个简易的选项卡,性能不优化
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Js简易选项卡</title>
<style type = "text/css">
* {
margin: 0px;
padding: 0px;
}
div#wrap {
margin: 50px auto;
width:604px;
}
#item {
height: 40px;
border: 2px solid #000;
border-radius: 5px 5px 0 0;
background-color: black;
}
#item ul {
list-style:none;
}
#item ul li {
width: 120px;
height: 40px;
line-height: 40px;
float:left;
text-align:center;
color: #fff;
border-radius: 5px;
}
#item li:hover {
color: black;
background-color: #129884;
}
div#content {
width: 600px;