问题
Antecedent 1: A static hugo page generated by the blogdown R package.
Antecedent 2: A blog post created from a rmarkdown document with R plots.
Question: Some way to resize a plot produced by a chunk of R code in a rmarkdown post when I open the page from a mobile phone?
For example, all the content of this post is resize when I open from my mobile except the plot. How can achieve something like that?
Thank in advance!
回答1:
The easiest way to resize images according to the available screen width is to set this CSS rule:
img {
max-width: 100%;
}
来源:https://stackoverflow.com/questions/45827291/resize-a-plot-generated-in-r-in-a-web-page-generated-by-blogdown-to-different-sc