【问题标题】:Change mouse-pointer in revolution slider在旋转滑块中更改鼠标指针
【发布时间】:2016-03-10 08:38:41
【问题描述】:

我目前正在处理这个WordPres-Template。你看到“预约”下的按钮了吗?我不知何故需要将鼠标指针 onmouseover 更改为默认值。但是模板使用了Revolution Slider,所以我不知道把代码放在哪里。

我试过这样的:

img:hover
{
    cursor:ponter;
}

GUI of Revolution Slider

我也试过这个:

.tp-caption .lfr .tp-scrollbelowslider .start .img:hover
{
    cursor:pointer;
}

滑块的 HTML 如下所示:

<div class="tp-caption lfr tp-scrollbelowslider start" data-x="703" data-y="691" data-speed="300" data-start="500" data-easing="Power3.easeInOut" data-elementdelay="0.1" data-endelementdelay="0.1" data-endspeed="300" data-scrolloffset="0" style="z-index: 9; left: 0px; top: 200px; visibility: visible; opacity: 1; transform: translate3d(0px, 0px, 0px);"><img style="width: 0px; height: 0px;" src="http://test.de/wp-content/uploads/2016/03/whitebutton.png" alt=""> 
        </div>
<img style="width: 0px; height: 0px;" src="http://test.de/wp-content/uploads/2016/03/whitebutton.png" alt=""> 

这个选择器也不起作用:

li.tp-revslider-slidesli:nth-child(2) > div:nth-child(6) > img:nth-child(1):hover

【问题讨论】:

  • 请直接将代码添加到您的问题中,无需使用图像。当复制和粘贴变得如此简单时,没有人愿意在答案中输入代码。
  • 增加 CSS 指令的优先级使其更精确。而不是img:hover 我们body article .div-a .div-b img:hover。 dom路径越精确,渲染时优先级越高。

标签: css wordpress html revolution-slider


【解决方案1】:

cursor:pointer!important; 将在该特定图层的 Style -> Advanced CSS 选项下为所选图层输入它。

【讨论】:

  • 这正是我想要的,谢谢!希望这是公认的答案。
【解决方案2】:

你不需要 javascript ,你可以通过 css 来做 转到你的 css 文件并粘贴这一行,它将起作用:.start{cursor:pointer!important;}

【讨论】:

  • 是的,这是可行的,但我的鼠标指针位于完整的左侧(带有文本的蓝色框)。我认为,我的问题是,我无法找到正确的选择器。最后一次尝试是: .tp-caption .lfr .tp-scrollbelowslider .start .img:hover
  • 那么你需要像这样使用它:.start img {cursor:pointer!important;}
  • 我已经试过了。 .start img:hover { cursor:pointer !important; } 工作正常,但蓝色框也是一个 img,所以你又遇到了问题。我的 CSS 不是很好。我想我只需要正确的语法来选择 only this class="tp-caption lfr tp-scrollbelowslider start",我会没事的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-09-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-06-01
相关资源
最近更新 更多