html:

<div class="dw4">
<span class="dw">单位(次)</span>
<div class="time4">
<div class="dat day active4">a</div>
<div class="dat month">b</div>
</div>
</div>

<div class="tabinners4">
<div class="inner4">
    我是第一个内容哦
</div>

<div class="inner4">
我是第二个内容呀

</div>

</div>

css:

.dw4{
position: relative;
}
.time4{
position: absolute;
right:6px;
top:2px;
}
.time4 .dat{
width: 55px;
height: 20px;
display: inline-block;
/* float: right; */
color: #fff;
font-size: 12px;
background: url(../image/l4.png) no-repeat;
padding-left: 11px;
padding-top: 1px;
cursor: pointer;
}

.dw4 .active4{

background: url(../image/h4.png) no-repeat;
cursor: pointer;
width: 55px;
}
.tabinners4 .inner4:first-child{
display: block;
}

.inner4{
width: 370px;
height: 209px;
background: url(../image/kuang4aa.png) no-repeat;
position: relative;
display: none;
margin-top: 12px;
}

js:

$(".time4 .dat").click(function(){
$(this).addClass('active4').siblings().removeClass('active4');
var index=$(this).index();
$(".tabinners4 .inner4").eq(index).show().siblings().hide();
})

最新文章

  1. 听H3絮叨:何以让天下没有难用的流程
  2. Windows cmd 长时间不输出新内容 直到按下ctrl + c 取消或者回车的解决办法
  3. PHP 面向对象编程和设计模式 (5/5) - PHP 命名空间的使用及名称解析规则
  4. Android中的AlertDialog使用示例五(自定义对话框)
  5. Expression Blend 4 学习笔记
  6. vsftpd 修改默认目录
  7. [整理]android中几种常见的尺寸
  8. dedecms 列表每隔6行输出一个空li
  9. 检查.net代码中占用高内存函数(翻译)
  10. 【转】Linux Framebuffer
  11. ASP.NET MVC- VIEW Overview Part 1
  12. node 与php整合
  13. Google机器学习教程心得(三) 好的feature
  14. freemarker错误九
  15. 如何阻止sql注入(pdo篇)
  16. linux连接mysql 出现Access denied for user &#39;root&#39;@&#39;localhost&#39;(using password: YES)错误解决方案
  17. Java基础学习笔记六 Java基础语法之类和ArrayList
  18. pcntl php多进程
  19. linux与Windows使用编译区别及makefile文件编写
  20. google使用的开源的工具类Thumbnailator图像处理

热门文章

  1. 【HANA系列】SAP HANA STUDIO客户端升级更新
  2. idea中配置tomcat详细
  3. linux 运行时加载不上动态库 解决方法(转)
  4. 多线程16-SpinWait
  5. 《剑指offer》面试题26 复杂链表的复制 Java版
  6. python UnicodeEncodeError: &#39;gbk&#39; codec can&#39;t encode character ...
  7. 网络 osi七层协议
  8. [LeetCode] 154. 寻找旋转排序数组中的最小值 II
  9. P2217 [HAOI2007]分割矩阵
  10. vue表单校验(三)