html – 为什么CSS中的“cursor:pointer”效果不起作用
发布时间:2020-12-14 23:49:50 所属栏目:资源 来源:网络整理
导读:HTML: div id="firstdiv" div id="intro" h1 id="name"YOU CHIA LAI/h1 ul li class="about"I am a Master of spanArchitecture/span candidate at Rice University. /li li class="about"I am also interested in spanphotography/span spanweb design/spa
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; } 是我的代码的一小部分.我设置光标:.about> span的指针,但是当鼠标悬停在< span>中的这些文本上时,光标不会变为指针模式.我想知道为什么它不工作.我真的是新的在html和css,这个问题可能是愚蠢的但plz帮助我.提前致谢. 解决方法
简单的答案是,您需要更改z-index,以便#firstdiv被考虑在其他div之上.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容