<style>
.menu{
position:absolute;
border:1 solid #C0C0C0;
background:#DCDCDC;
padding:1 1;
width:80px;
}
.item{
margin:0 0;
padding:1 1;
background:#DCDCDC;
font-family:tohoma;
font-size:12;
width:100%;
height:100%;
event:expression(
onmouseover=function(){
style.color="#FFFFFF";
style.background="#00008B";
},
onmouseout=function(){
style.color="#000000";
style.background="#DCDCDC";
}
)
}
</style>
<div class="menu">
<div class="item">Link1Link1</div>
<div class="item">Link2</div>
<div class="item">Link1</div>
<div class="item">Link1</div>
</div>
.menu{
position:absolute;
border:1 solid #C0C0C0;
background:#DCDCDC;
padding:1 1;
width:80px;
}
.item{
margin:0 0;
padding:1 1;
background:#DCDCDC;
font-family:tohoma;
font-size:12;
width:100%;
height:100%;
event:expression(
onmouseover=function(){
style.color="#FFFFFF";
style.background="#00008B";
},
onmouseout=function(){
style.color="#000000";
style.background="#DCDCDC";
}
)
}
</style>
<div class="menu">
<div class="item">Link1Link1</div>
<div class="item">Link2</div>
<div class="item">Link1</div>
<div class="item">Link1</div>
</div>
解决方案 »
- Jsp菜鸟求教大神如何通过radio的选项来控制select的disabled
- 在javaspcipt中怎么放入css外联的那句代码呢,求高手指点
- 在指定页面中,写入层,实现动态悬浮窗口
- form的提交问题,超难?
- 关于怎样用JAVASCRIPT设置下拉列表框选定值的疑问
- 哪位朋友给我讲讲身么是fso?它都能做身么?有身么优势?
- 怎样去掉IE的工具栏和地址栏?
- js正则表达式匹配返回数组
- jquery mobile引起表单重复提交
- Cannot read property 'setData' of undefined
- 跳转问题怎么实现!!!!!!!!我等啊·····
- 对日项目,input框得到光标时,输入法自动变成半角カナ,怎么实现呢
<style>
.menu{
position:absolute;
border:1 solid #C0C0C0;
background:#DCDCDC;
padding:1 1;
}
.item{
margin:0 0;
padding:1 1;
background:#DCDCDC;
font-family:tohoma;
font-size:12;
width:200;
event:expression(
onmouseover=function(){
style.color="#FFFFFF";
style.background="#00008B";
},
onmouseout=function(){
style.color="#000000";
style.background="#DCDCDC";
}
)
}
</style>
<div class="menu">
<div class="item">Link1Link1</div>
<div class="item">Link2</div>
<div class="item">Link1</div>
<div class="item">Link1</div>
</div>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title></head>
<body>
<style>
.menu{
position:absolute;
border:1 solid #C0C0C0;
background:#DCDCDC;
padding:1 1;
}
.item{
margin:0 0;
padding:1 1;
background:#DCDCDC;
font-family:tohoma;
font-size:12;
event:expression(
onmouseover = function()
{
this.style.color='#FFFFFF'; this.style.backgroundColor = '#00008B' ;
},
onmouseout = function()
{
this.style.color='#000000';
this.style.backgroundColor = '#DCDCDC' ;
}
)}</style>
<div class="menu">
<div class="item">Link1Link1</div>
<div class="item">Link2</div>
<div class="item">Link1</div>
<div class="item">Link1</div>
</div></body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>rowIndex</title>
<style media="all" type="text/css">
<!--
body
{
margin: 0px;
font-family: 宋体, MS Song;
font-size: 9pt;
color: windowtext;
background: threedface;
}
div.Page_Load
{
margin-left: 40px;
margin-top: 20px;
}
table.Main
{
border: 1px solid #A9A9A9;
background-color: White;
}table.Main tr
{
margin:0 0;
padding:1 1;
background:#DCDCDC;
font-family:tohoma;
font-size:12;
event:expression(
onmouseover = function()
{
this.style.color='#FFFFFF'; this.style.backgroundColor = '#00008B' ;
},
onmouseout = function()
{
this.style.color='#000000';
this.style.backgroundColor = '#DCDCDC' ;
}
)}
table.Main tr td
{
text-indent: 1.2em;
}-->
</style>
</head><body>
<div class="Page_Load"><table class="Main">
<tr>
<td>11111111111111</td>
</tr>
<tr>
<td>2</td>
</tr>
<tr>
<td>3</td>
</tr>
<tr>
<td>4</td>
</tr>
<tr>
<td>5</td>
</tr>
<tr>
<td>6</td>
</tr>
<tr>
<td>7</td>
</tr>
<tr>
<td>8</td>
</tr>
<tr>
<td>9</td>
</tr>
</table></div>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>rowIndex</title>
<style media="all" type="text/css">
<!--
div.menu
{
position:absolute;
border:1 solid #C0C0C0;
background:#DCDCDC;
padding:1 1;
}
table.item
{
border: 1px solid #A9A9A9;
background-color: White;
}table.item tr
{
margin:0 0;
padding:1 1;
background:#DCDCDC;
font-family:tohoma;
font-size:12;
event:expression(
onmouseover = function()
{
this.style.color='#FFFFFF'; this.style.backgroundColor = '#00008B' ;
},
onmouseout = function()
{
this.style.color='#000000';
this.style.backgroundColor = '#DCDCDC' ;
}
)}
</style>
</head><body>
<div class="menu"><table class="item">
<tr>
<td>11111111111111</td>
</tr>
<tr>
<td>2</td>
</tr>
<tr>
<td>3</td>
</tr>
<tr>
<td>4</td>
</tr>
<tr>
<td>5</td>
</tr>
<tr>
<td>6</td>
</tr>
<tr>
<td>7</td>
</tr>
<tr>
<td>8</td>
</tr>
<tr>
<td>9</td>
</tr>
</table></div>
</body>
</html>
.menu{
position:absolute;
就是这个position导致div的问题出现.菜单没有必要绝对定位吧,去掉就可以了
是的,的确是不响应!请看测试:
<style>
.menu{
position:absolute;
border:1 solid #C0C0C0;
background:#DCDCDC;
padding:1 1;
}
.item{
margin:0 0;
padding:1 1;
background:#DCDCDC;
font-family:tohoma;
font-size:12;
event:expression(
onmousemove=function(){
view.innerHTML = event.srcElement.id +','+ event.srcElement.innerText;
style.color="#FFFFFF";
style.background="#00008B";
},
onmouseout=function(){
style.color="#000000";
style.background="#DCDCDC";
}
)
}
</style>
<div id='view'>这里</div>
<div id=1 class="menu">
<div id=2 class="item">Link1Link1</div>
<div id=3 class="item">Link2</div>
<div id=4 class="item">Link1</div>
<div id=5 class="item">Link1</div>
</div>
position:absolute;都是这句惹的祸,为什么要绝对定位呢?如果不必要去掉就可以解决问题了关于日期的常见操作
http://community.csdn.net//Expert/TopicView2.asp?id=4360247&datebasetype=now
js FAQ贴
http://community.csdn.net//Expert/TopicView2.asp?id=4356360&datebasetype=now
DHTML手册,js手册,dom手册下载
http://community.csdn.net//Expert/TopicView2.asp?id=4356325&datebasetype=now