使用vue实现简单的选项卡,需要知道v-show和v-on的基本用法
<style>
body {
font-family: "Microsoft YaHei";
}
#tab {
width: 600px;
margin: 0 auto;
}
.tab-tit {
font-size: 0;
width: 600px;
border-radius: 20px;
}
.tab-tit a {
display: inline-block;
height: 40px;
line-height: 40px;
font-size: 16px;
width: 25%;
text-align: center;
background: #ccc;
color: #333;
text-decoration: none;
}
.tab-tit .cur {
background: #09f;
color: #fff;
}
.tab-con div {
border: 1px solid #ccc;
height: 400px;
line-height: 400px;
text-align: center;
font-size: 100px;
padding-top: 20px;
}
</sty