JSSOR slider: Image Gallery demo add CSS rules for active mousedown event on desktop

我怕爱的太早我们不能终老 提交于 2019-12-08 11:20:54

问题


For the demo that can be seen here Image Gallery Demo I like to add CSS rules for when a user keeps the mouse button pressed down, so active mousedown event, on a thumbnail in the thumbnail gallery.

I would like to have the opacity of the active clicked thumbnail to be at 100% (what I managed to do) as well as have a white solid border or 2px round the thumbnail item. The border is what I am struggling with.

Thank you for your help.

.jssort07 .p:hover .i, .jssort07 .pav .i {
    filter: alpha(opacity=100);
    opacity: 1;
}    


/* thumbnail item mousedown active event for desktop behaviour */
/* .pdn since this is (mousedown) given the JSSOR docs */

.jssort07 .p:active .i, .jssort07 .pdn .i {
    filter: alpha(opacity=100);
    opacity: 1;

    /* how can I add CSS for a 2px white border for this event please */
    /* this below does not work */
    border: 2px solid white;                                    
}

回答1:


It worked already.

As 2px border added, please decrease the size of it as well,

.jssort07 .p:active .i, .jssort07 .pdn .i {
    filter: alpha(opacity=100);
    opacity: 1;

    border: 2px solid white;
    width: 68px;
    height: 68px;
}


来源:https://stackoverflow.com/questions/28816283/jssor-slider-image-gallery-demo-add-css-rules-for-active-mousedown-event-on-des

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!