tab

tab栏切换

怎甘沉沦 提交于 2019-11-26 19:40:47
最简单的tab栏切换 html部分 <ul class="tab"> <li class="item">待支付(1)</li> <li class="item active">保障中(50)</li> <li class="item">已失效(50)</li> </ul> css部分 .policy_list_wrapper .tab { overflow: hidden; margin-bottom: .15rem; background: #fff; padding: .2rem; border-bottom: 1px solid #DDDDDD; } .policy_list_wrapper .tab .item { float: left; width: 33%; text-align: center; padding: .2rem 0; } jquery部分 $('.tab .item').click(function(){ $(this).addClass('active').siblings().removeClass('active') }); 效果展示 再加一个 来源: http://www.cnblogs.com/lml-lml/p/8691448.html

UITabBar Contoller

怎甘沉沦 提交于 2019-11-26 10:15:30
。UITabBar中的UIViewController获得控制权:   在TabBar文件中添加:   IBOutlet UITabBar *myTabBar; //在xib中连接tabBar;    (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:      (UIViewController   *)viewController{    if ([viewController isKindOfClass:[ViewInTabBar class]])    {    [self.navigationController setNavigationBarHidden:YES animated:YES];    [self.myTabBar setHidden:YES];    [(ViewInTabBar *)viewController setTab:self];//传递指针    [viewController viewWillAppear:YES];    }   在ViewInTabBar中添加:   TabBar *tab; //接收指针    [tab.navigationController setNavigationBarHidden:NO

js-tab栏切换

南楼画角 提交于 2019-11-26 01:51:21
鼠标点击上面相应的选项卡(tab),下面内容跟随变化 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> * { margin: 0; padding: 0; } li { list-style-type: none; } .tab { width: 990px; min-height: 220px; } .tab_nav { display: inline-block; display: block; position: relative; height: 40px; background-color: #f7f7f7; border: 1px solid #eee; border-bottom: 1px solid #e4393c; } .tab_nav li { position: relative; display: inline-block; padding: 10px 25px; font

flutter,SliverPersistentHeader实现Tab顶部吸附固定效果

喜你入骨 提交于 2019-11-25 21:27:56
直接上代码啦 import 'package:flutter/material.dart'; class StickyDemo extends StatefulWidget { @override _StickyDemoState createState() => _StickyDemoState(); } class _StickyDemoState extends State<StickyDemo> with SingleTickerProviderStateMixin { TabController tabController; @override void initState() { super.initState(); this.tabController = TabController(length: 2, vsync: this); } @override Widget build(BuildContext context) { return Scaffold( body: CustomScrollView( slivers: <Widget>[ SliverAppBar( pinned: true, elevation: 0, expandedHeight: 250, flexibleSpace: FlexibleSpaceBar( title: Text(