如何使谷歌电子表格图表响应

chi*_*ora 0 css wordpress google-sheets media-queries

<iframe height=468 width=1584 src="//docs.google.com/spreadsheets/d/1hUgiZqpgjqqtpnYY6Q1IeoUYlpXlCRUeARpN3cWX87g/gviz/chartiframe?oid=2131305794" seamless frameborder=0 scrolling=no></iframe>
Run Code Online (Sandbox Code Playgroud)

即使将宽度更改为 100% 后,它也不会使其响应。我将此图嵌入到 WordPress 网站上。

小智 5

将 div 放在该 iframe 周围(作为父元素),并将 CSS“transform:scale(0.5)”设置为该 div。

<div style="transform: scale(0.5, 0.5);">
<iframe ...>
</div>
Run Code Online (Sandbox Code Playgroud)

它将调整整个框架的大小,包括其内容。