【发布时间】:2013-08-28 09:10:00
【问题描述】:
我将cursor: pointer 设置为.about > span,但是当我的鼠标悬停在<span> 中的这些文本上时,光标不会变为指针模式。我想知道为什么它不起作用。
HTML:
<div id="firstdiv">
<div id="intro">
<h1 id="name">YOU CHIA LAI</h1>
<ul>
<li class="about">I am a Master of <span>Architecture</span>
candidate at Rice University.
</li>
<li class="about">I am also interested in <span>photography</span> &
<span>web design</span>.</li>
<li class="about">I wish you can know more <span>about</span> me.
</li>
</ul>
</div>
</div>
CSS:
#firstdiv {
position:fixed;
top:0;
left:0;
right:0;
height:100%;
width:100%;
margin:auto;
background:#E6E6E6;
text-align:center;
font-size:0;
z-index:-2
}
.about > span {
cursor:pointer;
font-family:Eurofurence Light;
padding:0 0 3px 0;
color:#01DFA5;
}
【问题讨论】:
-
从
#firstdiv中删除z-index:-2并查看why you shouldn't just paste a link to your demo page。 -
奇怪地和我一起工作,会是
z-index,这个故障发生在哪个浏览器中? +1 @MarcelGwerder
标签: html css mouse-cursor