jquery模仿的A的标题属性(兼容ie6/7)
用jQuery实现的模仿A的标题属性的例子,在测试的时候,在ie6、7、7上出现了层次混乱,但最终还是解决了。Html代码如下:复制代码如下: div class=' wrap ' ul class=' list clear fix ' lia href=' ui designer/a div class=' show' pDepartment:技术部门/p工作地点:郑州/p部门编号:21/p /div/Li href='前端开发工程师/a div class=' show ' pDepartment:技术部门/p工作地点:郑州/p部门编号:21/p/div/li lia href 项目编号:21/p /div /li lia href=' R&D工程师/a div class='显示'项目部:技术部/p项目工作地点:郑州/p项目编号:21/p/div/Li lia href=' UI设计师/a div class='显示'项目部:技术部/p工作地点:郑州/p项目编号:21/p/div/Li lia href='前端开发工程师/a div class='显示'项目部:郑州/p项目部A div class=' show '项目部:技术部/p工作地点:郑州/p项目部编号:21/p /div /li lia href='' R&D工程师/a div class=' show '项目部:技术部/p工作地点:郑州/p项目部编号:21/p /div/Li href=' ui设计师/a div class=' show '项目部:技术部/p工作地点:郑州/p项目部编号:21/p/div 部门编号:21/p /div /li lia href='运维工程师/a div class=' show '部门:技术部/p工作地点:郑州/p部门编号:21/p/div/Li lia href=' R&D工程师/a div class=' show '部门:技术部/p工作地点:郑州/P招聘编号:21/p /div /li /ul /div css代码如下。 复制代码如下: * { margin:0划水:0;} body { font-size :12 px;} .包装{ width:600pxmargin:100px auto} .clearfix:after, clear fix : before { display : table;content :“”;} .clearfix:after在{ clear:both飞越:隐藏;} .clear fix { zoom : } 1;} .列表{ position:relative//作为定位的父元素,li直接作为父元素,导致元素内容重叠}。list Li { list-style : none;宽度width:100pxheight:24px线高:24 px;右边距:10 px;float:left} .列出阿利{ text-decoration : one;color: # 333显示:块;} .显示{ position:absolute宽度width:100pxbackground: # FFFFE1border:1px实心# ffcc01padding:6pxdisplay:nonez索引:5;margin-top :10 px;//替换上边距-left :60 px;//替换左侧}。显示p { height:18px行高:18 px;} .列表Li a : hover { text-decoration :下划线;color: # FF0000} jQuery代码如下:复制代码如下: script type=' text/JavaScript ' $(function(){ var $ Li=$(')。换行')。find(' Li ');$li.bind('mouseover ',function(){ $(this)。查找('。show’)。show();}).bind('mouseout ',function(){ $(this)。查找('。show’)。hide();})})/脚本预览效果;
版权声明:jquery模仿的A的标题属性(兼容ie6/7)是由宝哥软件园云端程序自动收集整理而来。如果本文侵犯了你的权益,请联系本站底部QQ或者邮箱删除。