相关疑难解决方法(0)

将光标设置为具有is-inactive类的元素的默认值

目的

一旦最大的球员(二守门员,六名防守队员,十二向前)在他们的每一个类别的数量已被选定,其余球员picked与类is-inactive应被设置为cursor:default

澄清问题

所有玩家都将该类is-inactive作为默认类别,而我正在尝试做的cursor: default只是在其他玩家被选中并且已经将他们的班级切换到之后才尝试设置is-active.

即.挑选了两个守门员,现在拥有该类is-activecursor:pointer在悬停时采取行为.这个类别共有十名球员,其他八名守门员都is-inactive应该有这种cursor: default行为.

问题

  • 我正在尝试将光标的css切换回默认值,但即使玩家is-inactive仍然拥有cursor: pointer它们

style.css文件

.player {
  display: inline-block;
  margin-top: 15px;
  margin-right: 20px;
  vertical-align: top;
  cursor: pointer;
  position: relative;
}
Run Code Online (Sandbox Code Playgroud)

的index.html

<div class="player player--goalie year--1990">
  <div class="tooltip tooltip--tall">
    <p class="tooltip__name">Brian Elder</p>
    <p class="tooltip__hometown"><span>Hometown:</span> Oak Lake, Man.</p>
    <p class="tooltip__years"><span>Years Played:</span> 1992-1997</p>
    <div class="tooltip__stats--inline">
      <div class="stats__group stats--games">
        <p class="stats__header">GP</p>
        <p class="stats__number …
Run Code Online (Sandbox Code Playgroud)

javascript css jquery cursor

12
推荐指数
1
解决办法
282
查看次数

标签 统计

css ×1

cursor ×1

javascript ×1

jquery ×1