简体   繁体   English

如何制作可点击按钮?

[英]How to make clickable button?

I have an problem with pointers, in my project i have an box of notification and i want to make not hover, i did it in this way with pointer-events: none : 我有一个指针问题,在我的项目中我有一个通知框,我想不要悬停,我用指针事件这样做:没有:

.ui-pnotify.ui-pnotify-fade-normal.ui-pnotify.ui-pnotify-move{
        top: 47px !important;
    right: 0px !important; 
    pointer-events: none !important;

} }

but the problem is that i want to make an button in this box not hover but just clickable, this class : 但问题是,我想在这个框中创建一个按钮而不是悬停但只是可点击,这个类:

.ui-pnotify-action-button{ 的.ui-pnotify动作按钮{

} }

I just want to be clickable not hovered because i have a big problem with hover. 我只是想点击不徘徊,因为我有悬停的大问题。 Can you help me please. 你能帮我吗。 Thanks in advance 提前致谢

Have you tried to apply your styles using pseudoclasses? 您是否尝试使用伪类应用样式? It seems you don`t want to see some styles. 看来你不想看到一些风格。

.ui-pnotify.ui-pnotify-fade-normal.ui-pnotify.ui-pnotify-move:hover{
    top: 47px !important;
    right: 0px !important;
    // whatever you want it not to be while it is been hovered
}

Also, consider to remove !important and a lot of classes - it`s not a good practice. 另外,考虑删除!important和很多课程 - 这不是一个好习惯。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM