让Gist嵌入滚动 [英] Make Gist embed scrollable

查看:144
本文介绍了让Gist嵌入滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使主要嵌入脚本具有垂直滚动条?我想将我的要点嵌入到我的博客文章中,但是这是一个很长的代码。我想在我的博客文章中看到我的要求:

is it possible to make gist embed script have vertical scroll bar? I want to embed my gist to my blog post, but it's a long code. I want my gist look like this in my blog post :

推荐答案

最简单的解决方案是将以下代码添加到CSS中:

The easiest solution is to add the following code to your CSS:

.gist-data{
    height:250px; // Any height
    overflow-y: visible;
}

这会限制要点容器的高度,我尝试过其他包装这是第一个限制身高的人。

This will limit the height of the gist's container, I tried other wrappers around it and this was the first one to limit the height.

根据具体情况,您可能需要添加!important 在你的风格。

Depending on specificity, you may need to add !important in your styles.

这篇关于让Gist嵌入滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆