全尺寸闪亮的应用程序,在碘幻灯下演示幻灯片

时间:2023-02-11 09:21:36

Trying to figure out how to have a full size shiny app in an ioslides markdown. I have something almost working, but it is a bit ad-hoc. I am also not confident it will reproduce when I show the presentation on a larger resolution screen (as I use px in the div)?:

试图弄清楚如何在一个ioslides markdown中拥有一个完整大小的闪亮应用程序。我有些东西几乎可以用,但有点特别。当我在一个更大的分辨率屏幕上显示演示文稿时(当我在div中使用px时),我也不确定它是否会再现?

---
title: "My Title"
author: "My Name"
date: "29 March 2016"
runtime: shiny
output: 
  ioslides_presentation
---
##  

<div style="margin-left:-50px; margin-top:-50px; width:80%; height:100%">
```{r, echo=FALSE, message=FALSE, fig.width=8}
inputPanel(
  selectInput("n_breaks", label = "Number of bins:",
              choices = c(10, 20, 35, 50), selected = 20),

  sliderInput("bw_adjust", label = "Bandwidth adjustment:",
              min = 0.2, max = 2, value = 1, step = 0.2)
)

renderPlot({
  hist(faithful$eruptions, probability = TRUE, breaks = as.numeric(input$n_breaks),
       xlab = "Duration (minutes)", main = "Geyser eruption duration")

  dens <- density(faithful$eruptions, adjust = input$bw_adjust)
  lines(dens, col = "blue")
})
```
</div>

giving:

给:

全尺寸闪亮的应用程序,在碘幻灯下演示幻灯片

which kind of uses up some of the large margin space (as desired) but still does not cover the whole slide.

这种方法会占用很大的空白空间(如所需),但仍然不能覆盖整个幻灯片。

1 个解决方案

#1


3  

Try playing around with the values in your div<>. You can go over 100% and also set the size in pixels, e.g. <div style="margin-left:-120px; margin-top:-50px; width:900px">

尝试使用div<>中的值。您可以超过100%并设置像素大小,例如

#1


3  

Try playing around with the values in your div<>. You can go over 100% and also set the size in pixels, e.g. <div style="margin-left:-120px; margin-top:-50px; width:900px">

尝试使用div<>中的值。您可以超过100%并设置像素大小,例如