admin管理员组文章数量:1245838
Is there a way in vuetify
to change the mouse cursor, when hovering over or clicking on the blue circular button element of the slider (v-slider
)?
This is what it looks / behaves right now:
This is the way I want it to look / behave like:
I tried inline style, but it doesn't work: style="cursor: pointer"
Is there a way in vuetify
to change the mouse cursor, when hovering over or clicking on the blue circular button element of the slider (v-slider
)?
This is what it looks / behaves right now:
This is the way I want it to look / behave like:
I tried inline style, but it doesn't work: style="cursor: pointer"
3 Answers
Reset to default 7There is no props available to change cursor. Possible way to change cursor to add css to .v-slider__thumb
class
.v-slider__thumb{
cursor:grabbing;
height:42px;
width:42px;
}
Codepen : https://codepen.io/anon/pen/XGOqWm
First add a class to the then style as CSS. Exapmle below
<v-list>
<v-list-item
v-for="(item, index) in items"
:key="index"
>
<v-list-item-title
class="row-pointer"
>{{ item.title }}</v-list-item-title>
</v-list-item>
</v-list>
<style scoped>
.row-pointer {
cursor: pointer;
}
</style>
Here's the way I did it. This method enables the cursor to change from grab
to grabbing
when the user is clicking-and-holding the draggable part of the slider.
<style scoped lang="scss">
.my-slider-class >>> .v-slider {
cursor: pointer;
&:active {
cursor: grabbing;
}
.v-slider__thumb {
cursor: grab;
&:active {
cursor: grabbing;
}
}
}
</style>
本文标签: javascriptVuetify slider Change mouse cursor to pointer on hover and clickStack Overflow
版权声明:本文标题:javascript - Vuetify slider: Change mouse cursor to pointer on hover and click - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740205349a2240975.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论