DDR爱好者之家 Design By 杰米
tab栏:
代码:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Tab 标签</title> <style> body { margin: 0; padding: 0; background-color: #F7F7F7; } .tabs { width: 400px; margin: 30px auto; background-color: #FFF; border: 1px solid #C0DCC0; box-sizing: border-box; } img { width: 400px; } .tabs nav { height: 40px; text-align: center; line-height: 40px; overflow: hidden; background-color: #C0DCC0; display: flex; } nav a { display: block; width: 100px; border-right: 1px solid #FFF; color: #000; text-decoration: none; } nav a:last-child { border-right: 0 none; } nav a.active { background-color: #9BAF9B; } .cont { overflow: hidden; /*display: none;*/ } .cont ol { line-height: 30px; } p { text-align: center; height: 30px; line-height: 30px; } li { list-style: none; height: 30px; line-height: 30px; } </style> <!--[if lte IE 6]> <![endif]--> </head> <body ng-app="Tabs"> <div class="tabs" ng-controller="TabsController"> <nav> <!-- 指令之间没有分号 --> <a href="javascript:;" ng-class="{active: type == 'local'}" ng-mouseover="switch('local')">白山茶</a> <a href="javascript:;" ng-class="{active: type == 'global'}" ng-mouseover="switch('global')">作曲</a> <a href="javascript:;" ng-class="{active: type == 'sports'}" ng-mouseover="switch('sports')">背景</a> <a href="javascript:;" ng-class="{active: type == 'funny'}" ng-mouseover="switch('funny')">歌词</a> </nav> <div ng-switch on="type"> <section class="cont" ng-switch-when="local"> <p>2017.5.24</p> </section> <section class="cont" ng-switch-when="global"> <p>作曲:陈雪凝</p> <p>作词:陈雪凝</p> <p>编曲:海艺音乐</p> </section> <section class="cont" ng-switch-when="sports"> <img src="/UploadFiles/2021-04-02/bsc.png">mvc小案例:
代码:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Template "stylesheet" href="css/base.css"> --> <link rel="stylesheet" href="css/index.css"> <!-- CSS overrides - remove if you don't need it --> <link rel="stylesheet" href="css/app.css"> </head> <body ng-app="Todos"> <section class="todoapp" ng-controller="TodoController"> <header class="header"> <h1>todos</h1> <form ng-submit="add()"> <!-- 用户输入点 --> <input class="new-todo" placeholder="What needs to be done" ng-model="text" autofocus> </form> </header> <section class="main"> <input class="toggle-all" type="checkbox"> <label for="toggle-all">Mark all as complete</label> <ul class="todo-list"> <li ng-repeat="(key,todo) in todos"> <div class="view"> <input type="checkbox" class="toggle" ng-click="done(key)" > <label>{{todo.text}}</label> <button class="destroy" ng-click="delete(todos,key)" ></button> </div> <input class="edit" value="Create a TodoMVC template"> </li> <li><h5>已完成</h5></li> <li class="completed" ng-repeat="todo in doneTodos"> <div class="view"> <input class="toggle" type="checkbox" ng-checked="todo.flag" > <label>{{todo.text}}</label> <button class="destroy" ng-click="delete(doneTodos,key)"></button> </div> <input class="edit" value="Rule the web"> </li> </ul> </section> <footer class="footer"> <span class="todo-count"><strong></strong> {{todos.length}} item left</span> <button class="clear-completed">Clear completed</button> </footer> </section> <footer class="info"> <p>Double-click to edit a todo</p> <p>Template by <a href="http://sindresorhus.com">Sindre Sorhus</a></p> <p>Created by <a href="http://todomvc.com">you</a></p> <p>Part of <a href="http://todomvc.com">TodoMVC</a></p> </footer> </body> <script src="/UploadFiles/2021-04-02/angular.min.js">以上所述是小编给大家介绍的AngularJS tab栏实现和mvc小案例实例详解,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!
DDR爱好者之家 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
DDR爱好者之家 Design By 杰米
暂无评论...
更新日志
2024年11月25日
2024年11月25日
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]