html table hover,表格列的hover状态与选中状态
*{
padding: 0;
margin: 0;
}
.box{
margin: 50px auto;
width: 1000px;
}
.data-v{
padding-left: 87px;
border-left: #d3d3d3 1px solid;
border-right:0 ;
font-size: 14px;
}
.data-v table{
border-collapse: collapse;
border-spacing: 0;
table-layout: fixed;
width: 100%;
position: relative;
}
.data-v .data-v-head td{
border-bottom: #d3d3d3 1px solid;
}
.data-v .data-v-head div{
height: 100px;
box-sizing: border-box;
padding: 25px 0 0 0;
}
.data-v .data-v-head div h3{
font-size: 20px;
margin-bottom: 10px;
}
.data-v .data-v-head div span{
color: #666;
}
.data-v td{
height: 40px;
text-align: center;
border-left:#d3d3d3 1px solid;
background-clip: padding-box;
position: relative;
box-sizing: border-box;
padding: 10px;
cursor: pointer;
}
.data-v td div{
}
.data-v tr td:last-child{
border-right: #d3d3d3 1px solid;
}
.data-v tr td:first-child{
background-color: #fff;
border-left: none;
text-align: left;
width: 130px;
cursor: default;
}
.data-v tr td:first-child:after{
position: absolute;
content: '';
border-bottom: #f0f2f5 1px solid;
bottom:0px;
left: 0px;
width: 129px;
}
.data-v tr td:first-child h4{
position: absolute;
width: 206px;
top: -1px;
left: -87px;
font-size: 14px;
color: #999;
border-top: #d3d3d3 1px solid;
padding: 10px 0 0 10px;
}
.data-v tr:nth-child(2n){
background-color: #f0f2f5;
}
.data-v tr:first-child td{
border-top: #d3d3d3 1px solid;
}
.data-v tr:first-child td:first-child:after{
position: absolute;
content: '';
border-bottom: #d3d3d3 1px solid;
top:-1px;
left: -87px;
width: 207px;
height: 0px;
}
.data-v tr:last-child td:first-child{
border-bottom: 0;
}
.data-v tr:last-child td:first-child:after{
position: absolute;
content: '';
border-bottom: #d3d3d3 1px solid;
bottom:-1px;
left: -87px;
width: 217px;
height: 0;
}
.data-v tr:last-child td{
border-bottom: #d3d3d3 1px solid;
}
/*hover start*/
.data-v tr td.hover{
border-left: #2277da 1px solid;
border-right:#2277da 1px solid;
}
.data-v tr:first-child td.hover{
border-top: #2277da 1px solid;
background-color: #e8f1fb;
border-bottom: #bbd5f4 1px solid;
}
.data-v tr:first-child td.hover h3{
color: #4d8bdf;
}
.data-v tr:last-child td.hover{
border-bottom: #2277da 1px solid;
}
/*hover end*/
/*当前态 start*/
.data-v tr td.selected{
border-left: #2277da 1px solid;
border-right:#2277da 1px solid;
}
.data-v tr:first-child td.selected{
border-top: 0;
background-color: #e8f1fb;
border-bottom: #bbd5f4 1px solid;
}
.data-v tr:first-child td.selected:after{
position: absolute;
content: '';
border: #2277da 1px solid;
border-bottom: 0;
height: 10px;
width: 100%;
top: -10px;
left:-1px;
background-color: #e8f1fb;
}
.data-v tr:first-child td.selected h3{
color: #4d8bdf;
}
.data-v tr:last-child td.selected{
border-bottom: #2277da 1px solid;
}
.data-v tr:last-child td.selected:after{
position: absolute;
content: '';
background-image: url(https://www.chengrang.com/demo/icon18.png);
width: 32px;
height: 32px;
bottom: 0;
right:0;
}
/*当前态 end*/
/*当前态 end*/
@-moz-document url-prefix(){
.data-v tr:first-child td:first-child:after{
top:-2px;
}
.data-v tr:first-child td.selected:after{
width: calc(100% + 1px);
left:-2px;
}
}
标题节点练小习的说明 |
标题节点练小习的说明 |
标题节点练小习的说明 |
标题节点练小习的说明 |
|
类型节点类型标题 |
99%
|
99.9%
|
99.99%
|
100%
|
类型标题
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习类型标题
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
类型标题
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习高度随内容自适应调整高度随内容自适应调整高度随内容自适应调整高度随内容自适应调整高度随内容自适应调整高度随内容自适应调整高度随内容自适应调整
|
练小习撰写新文章
|
类型节点类型标题 |
99%
|
99.9%
|
99.99%
|
100%
|
类型标题
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
类型标题
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
类型标题
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
类型标题
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
类型节点类型标题 |
99%
|
99.9%
|
99.99%
|
100%
|
类型标题
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
类型标题
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
练小习撰写新文章
|
(function(){
var $data = $('.data-v');
$data
.on('click','td',function(){
var index = $(this).index();
$(this).closest('table').find('tr').each(function(cont,tr){
$(tr).find('td').each(function(i,item){
if(i==index&&i!=0){
$(item).addClass('selected')
}else {
$(item).removeClass('selected')
}
})
})
})
.on('mouseenter','td',function(){
var index = $(this).index();
$(this).closest('table').find('tr').each(function(cont,tr){
$(tr).find('td').each(function(i,item){
if(i==index&&i!=0){
$(item).addClass('hover')
}else {
$(item).removeClass('hover')
}
})
})
})
.on('mouseleave','td',function(){
$data.find('.hover').removeClass('hover')
})
})();
html table hover,表格列的hover状态与选中状态相关推荐
- antdv table 的表格列配置描述 columns
基本使用 1.配置 columns 属性,数据源数组 data-source -- span标签写插槽 <a-table :columns="columns" :data-s ...
- table(单击行,把当行的单选按钮(radio)设为选中状态,并应用当前样式)
直接上代码 <%@ page language="java" contentType="text/html; charset=UTF-8"pageEnco ...
- vue+element 表格中全选与清除选中
表格中添加 事件@selection-change (回调参数为选中的选项) 事件名 说明 参数 select 当用户手动勾选数据行的 Checkbox 时触发的事件 selection, row s ...
- elementui table组件和popover实现表格列内容过长,显示隐藏多余字段,hover显示所有内容;无内容或则内容少则不显示popover
elementui table组件和popover实现表格列内容过长,显示隐藏多余字段,hover显示所有内容:无内容或则内容少则不显示popover 1.场景效果 2.实现 3.进阶版 1.场景效果 ...
- 鼠标hover表格头部信息出现闪烁
在做下面这种表格的时候要求加入hover提示,鼠标hover上去出现提示信息,离开图标提示信息消失. 有时会出现hover上去不断闪烁的现象. 可以从下面3个方面试着解决: 1. 换成mouseent ...
- html表格不能横向自动展示,html table表格列数太多添加横向滚动条
HTML的table表格的列数如果太多或者某一列的内容太长,就会导致表格td的内容被挤压变形,对后台的使用体验非常不友好.比如下面的情况: 那么如何在表格列数较多的情况下添加横向滚动条?其实很简单,只 ...
- element-ui table表格 增加合计行 和 表格列固定之后 滚动条无法滚动
element-ui table表格 增加合计行 和 表格列固定之后 滚动条无法滚动 是因为el-table__fixed或el-table__fixed-right有了合计之后把 el-table_ ...
- python prettytable表格列数太多_html table表格列数太多添加横向滚动条
HTML的table表格的列数如果太多或者某一列的内容太长,就会导致表格td的内容被挤压变形,对后台的使用体验非常不友好.比如下面的情况: 那么如何在表格列数较多的情况下添加横向滚动条?其实很简单,只 ...
- layui table设置表格单元格换行,固定列高度改变
layui table设置表格单元格换行 css /** 控制表格单元格换行 **/ .layui-table-cell {height: auto;word-break: normal;displa ...
最新文章
- php----------const 定义的常量和define()定义的常量的区别?
- 【基础积累】1x1卷积到底有哪些用处?
- win8改win7 教程
- 用计算机演奏打上花火,米津玄师打上花火歌词中文谐音(最好要简单全面)
- git常用命令,项目删除原有github连接并重新连接,回滚,下拉分支代码,切换分支
- Qt-连续容器及迭代器
- “朝阳群众”APP上线!解读怎么做一款深入群众的应用
- 44.事件分发(示例)
- 翻译: 4.1 多层感知器MLP Multilayer Perceptrons pytorch
- JCreator使用技巧
- 向C语言之父—丹尼斯·里致敬
- 牌匾设计软件测试自学,回弹检测测点
- 计算机类课题研究方法,课题研究方法
- js室内地图开发_微信小程序室内地图导航开发-微信小程序JS加载esmap地图
- 29Flutter Sliver家族
- iOS描述文件mobileconfig文件的签名认证
- 高通SDX12:跨子系统数据共享实例分享
- 新买的显示器怎么测试软件,新买的电视如何检测屏幕?记住这个方法
- 关于求标准正态分布函数值
- 计算机最低配置有哪些,win10对电脑配置有哪些要求?win10最低配置要求