Skip to content

Instantly share code, notes, and snippets.

@nicoverbruggen
Created March 12, 2014 12:35
Show Gist options
  • Save nicoverbruggen/9506044 to your computer and use it in GitHub Desktop.
Save nicoverbruggen/9506044 to your computer and use it in GitHub Desktop.
Features you can use in CSS for Cordova builds (webkit)
/* The following optimizations can make your app feel more native. */
.element{
/* Disable selection/copy of UIWebView.
If you tap and hold, you can usually copy content fron a webview.
-webkit-user-select: none disables this functionality for a specific element. */
-webkit-user-select: none;
/* Disable the iOS popup when long-press on a link. (a-element, button, etc)
If you tap and hold, you can usually choose to Go to a certain location or Copy the location path.
-webkit-touch-callout: none disables this functionality so you can only tap the link. */
-webkit-touch-callout: none;
/* When scrolling an element, you might want to turn overflow scrolling on.
It adds rubber banding to any container with overflow: scroll. Useful if you disabled
rubber banding on the UIWebView itself! */
-webkit-overflow-scrolling: touch;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment