Is there a way to specify the width of an embedded

2019-05-28 02:11发布

问题:

I am trying to embed a gist into a webpage. Take the gist below as an example:

<script src="https://gist.github.com/Astr0surf3r/5208714.js"></script>

I wonder if there is a way to set the width of the gist. For example, I would like to to make the gist narrower than the default width.

回答1:

You can control the width by modifying the CSS class that this gist is using.

.gist { width: 250px; }

Example: http://jsfiddle.net/aFwEd/



标签: html github gist