onsen ui - How do I remove the tap effect when scrolling over <ons-list-item>'s but keeping the effect when tapping? -
when scroll through <ons-list>
, <ons-list-items>
highlighted darker grey background color, such effect show when tapping on list item, don't want effect when scrolling through list.
is there way rid of highlight effect when scrolling through?
webkit mobile choice renderer used mobile devices. 1 used style property -webkit-tap-highlight-color, allows developers change default tap highlight color. here's how use it!
/* light blue @ 80% opacity */ html { -webkit-tap-highlight-color: rgba(201, 224, 253, 0.8); } /* change div has similar background-color light blue tap color */ .bluediv { -webkit-tap-highlight-color: rgba(251, 185, 250, 0.9); }
changing -webkit-tap-highlight-color property value key! note using rgba color allows dimension opacity highlight color isn't harsh.
http://davidwalsh.name/mobile-highlight-color
but in onsenui change or remove tap effect change css class:
.list__item_active:active { background-color: #d9d9d9; -webkit-transition: none; -moz-transition: none; -o-transition: none; transition: none; }
Comments
Post a Comment