Change table class in view block
go to core\themes\stable\templates\views folder and copy views-view-table.html.twig or .tpl.php (depending if you are on Drupal 8 or 7)

copy the file and re-name it views-view-table--[view-name]--[machine-name].html.twig or .tpl.php

Then edit the file and add the class

If Drupal 8 

{%
  set classes = [
    'cols-' ~ header|length,
    responsive ? 'responsive-enabled',
    sticky ? 'sticky-enabled',
    'my-custom-class',
  ]
%}
&lt;table{{ attributes.addClass(classes) }}&gt;


If Drupal 7

&lt;table &lt;?php if ($classes) { print 'class="'. $classes . ' . ' ' . 'my-custom-class"'; } ?&gt;&lt;?php print $attributes; ?&gt;&gt;


Now place your template file in your theme's template folder.

Clear/flush the cache to see changes.