If you view source on your first example, keras.io, you can see the tag
<link rel="stylesheet" href="css/theme.css" type="text/css" />
Looking at the linked file, you see the comment
/*
* This file is copied from the upstream ReadTheDocs Sphinx
* theme. To aid upgradability this file should *not* be edited.
* modifications we need should be included in theme_extra.css.
*
* https://github.com/rtfd/sphinx_rtd_theme
*/
So I'd recommend checking out https://github.com/rtfd/sphinx_rtd_theme, and the page it links to about the theme, https://github.com/rtfd/sphinx_rtd_theme.