javascript - 自动调整使用脚本创建的区域的大小
问题描述
起初我不是程序员,但在某种程度上可以方便地调整代码。并不总是成功的。:-)
我有以下javascript:
<script type='text/javascript'
src='http://knvbwidget.sportlink.com/widget_js.php?soort=team-liggend&clubcode=xxxxxxx&height=1000&width=800'>
</script>
<script type='text/javascript'>
showWidget();
</script>
它以某种格式显示足球队的结果。如您所见,您可以设置高度和使用。
我想让这个自动调整,特别是高度。这可能吗?
我在 Wordpress 页面中使用此脚本。
提前致谢。
解决方案
I would then investigate the resulting document element(s). If e.g. some classes (lets say class="widget"
) or ids are added to the elements, you can add CSS code that modifies the behavior of those elements. e.g.
.widget {
width: 100%;
height: auto;
}
推荐阅读
- julia - 使用 Julia 无法在 Atom 中打开调试器窗格
- arm - 带有 std::pair 的 API
在 ARM 上从 C++14 切换到 C++17 时中断? - json - 如何正确地将新密钥传递给 JSON 字典?
- matlab - 将面顶点网格导出到 STL
- javascript - 我想在我的代码中多次调用一个函数?
- javascript - 使用 Passport.js 和 Sequelize 引用多个模型
- python - Amazon S3 boto3 如何遍历存储桶中的对象?
- java - 模拟 File.createTempFile() 并返回我们模拟的 File 对象
- java - TextView.setView() 不更新文本
- mapbox - Mapbox - 从自动完成结果中获取区域