html div中加表格,HTML:在表格上叠加div

我试图让div重叠在我的桌子上,让用户知道这个td不再有效了。

Overlay Tests
HTML5_Logo_64.pngText1Text2Text3
HTML5_Logo_64.pngText1Text2Text3

This is the overlay div.

的Javascript

$(document).ready(function() {

$('.row').mouseover(function() {

var $divOverlay = $('#divOverlay');

var bottomWidth = $(this).css('width');

var bottomHeight = $(this).css('height');

var rowPos = $(this).position();

bottomTop = rowPos.top;

bottomLeft = rowPos.left;

$divOverlay.css({

position: 'absolute',

top: bottomTop,

right: '0px',

width: '66.7%',

height: bottomHeight

});

$('#info').text('Top: ' + bottomTop + ' Left: ' + bottomLeft);

$divOverlay.delay(1000).slideDown('fast');

});

$('#divOverlay').mouseleave(function() {

var $divOverlay = $('#divOverlay');

$divOverlay.slideUp();

});

});

CSS

.cell{width: 80px; height: 80px; border: 1px solid #000;}

.blind{display: none; background:#000; height: 80px; width: 320px;}

.second{display:none; background: #00f; height: 80px; width: 320px;}

#divOverlay { display: none; background-color:Silver; text-align:center; position:absolute; z-index:10000; opacity:0.5; }

从上面的例子中,我只想删除mouserover效果,这样

divOverlay可以在任何时候超过td。

我试图修改Javascript代码,但我失败了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值