<!DOCTYPE html>
<html ng-app='app'>
<head>
<meta charset="UTF-8">
<title></title>
<style>
*{
list-style: none;
margin: 0;
padding: 0;
}
.TabNav{
height: 131px;
width: 450px;
position: relative;
margin-left: auto;
margin-right: auto;
margin-top: 100px;
}
.TabNav ul li{
float: left;
background: -webkit-gradient(linear,left top,left bottom, from(#fefefe), to(#ededed));
border: 1px solid #ccc;
padding: 5px 0;
width: 100px;
text-align: center;
margin-left: -1px;
position: relative;
cursor: pointer;
}
.TabCon{
position: absolute;
left: -1px;
top: 30px;
border: 1px solid #ccc;
border-top: none;
width: 403px;
height: 100px;
}
.TabNav ul li.active{
background: #FFFFFF;
border-bottom: none;
}
</style>
<script src="js/angular.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="TabNav">
<ul ng-init='activeTab=1'>
<li ng-class='{active:activeTab==1}' ng-click='activeTab=1'>许嵩</li>
<li ng-class='{active:activeTab==2}' ng-click='activeTab=2'>周杰伦</li>
<li ng-class='{active:activeTab==3}' ng-click='activeTab=3'>林俊杰</li>
<li ng-class='{active:activeTab==4}' ng-click='activeTab=4'>陈奕迅</li>
</ul>
<div class="TabCon">
<div ng-show='activeTab==1'>断桥残雪、千百度、幻听、想象之中</div>
<div ng-show='activeTab==2'>红尘客栈、牛仔很忙、给我一首歌的时间、听妈妈的话</div>
<div ng-show='activeTab==3'>被风吹过的夏天、江南、一千年以后</div>
<div ng-show='activeTab==4'>十年、K歌之王、浮夸</div>
</div>
</div>
</body>
<script type="text/javascript">
var app=angular.module('app',[]);
app.controller('tabcontroller',function($scope){
var vm=$scope.vm;
});
</script>
</html>
<!DOCTYPE html>
<html ng-app='app'>
<head>
<meta charset="UTF-8">
<title></title>
<style>
*{
list-style: none;
margin: 0;
padding: 0;
}
.TabNav{
height: 131px;
position: relative;
margin-left: 100px;
margin-top: 100px;
}
.TabNav ul li{
float: left;
background: -webkit-gradient(linear,left top,left bottom, from(#fefefe), to(#ededed));
border: 1px solid #ccc;
padding: 5px 0;
width: 100px;
text-align: center;
margin-left: -1px;
position: relative;
cursor: pointer;
}
.TabCon{
position: absolute;
left: -1px;
top: 30px;
border: 1px solid #ccc;
border-top: none;
width: 403px;
height: 100px;
}
.TabNav ul li.active{
background: #FFFFFF;
border-bottom: none;
}
</style>
<script src="js/angular.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="TabNav" ng-controller='tabcontroller'>
<ul ng-init='selected=0'>
<li ng-class='{active:selected==$index}' ng-click='show($index)' ng-repeat='item in vm'>{{item.list}}</li>
</ul>
<div class="TabCon">
<div ng-show='selected==$index' ng-repeat='item in vm'>{{item.con}}</div>
</div>
</div>
</body>
<script type="text/javascript">
var app=angular.module('app',[]);
app.controller('tabcontroller',function($scope){
$scope.vm=[
{"list":"许嵩","con":"断桥残雪、千百度、幻听、想象之中"},
{"list":"周杰伦","con":"红尘客栈、牛仔很忙、给我一首歌的时间、听妈妈的话"},
{"list":"林俊杰","con":"被风吹过的夏天、江南、一千年以后"},
{"list":"陈奕迅","con":"十年、K歌之王、浮夸"}
];
var selected=$scope.selected;
$scope.show=function(index){
$scope.selected=index;
};
});
</script>
</html>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有