如何使一个四分之一的HTML文档使用整个屏幕宽度?

huangapple go评论70阅读模式
英文:

How to make a quarto html document use the full screen width?

问题

我正在使用R创建一个quarto HTML文档,并将其发布到rpubs.com上。该文档仅使用窗口的中间部分,将左侧和右侧的三分之一留空。我如何告诉quarto使用整个窗口?以下是一个非常简单的可重现示例,出于某种原因,它确实使用了右侧三分之一以及中间三分之一,但仍然将左侧三分之一留空。

英文:

I am creating a quarto html document using R and publishing it to the web at rpubs.com. The document uses only the middle third of the window and leaves the left and right thirds blank. How can I tell quarto to use the full window? Here is a very simple reproducible example which, for some reason, does use the right third as well as the middle third, but still leaves the left third blank.

---
title: "Test"
format: html
editor: visual
---

## Quarto

| Col1 | Col2 | Col3 | Col4 | Col5 | Col6 | Col7 | Col8 | Col9 | Col10 | Col1 | Col2 | Col3 | Col4 | Col5 | Col6 | Col7 | Col8 | Col9 | Col10 | Col1 | Col2
|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------
| bal  | bal  | bal  | bal  | bal  | bal  | bal  | bal  | bal  | bla  | bal  | bal  | bla  | bal  | bal  | bla  | bal | bal  | bla  | bla  | bla  | bla    
| blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo | bal  | bla  | bla  | bla  | bla     
| bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli | bal  | bla  | bla  | bla  | bla   

答案1

得分: 2

也许你想在你的YAML标题中使用page-layout: full,就像这样:

---
title: "测试"
editor: visual
format:
  html:
    page-layout: full
---

Quarto

列1 列2 列3 列4 列5 列6 列7 列8 列9 列10 列1 列2 列3 列4 列5 列6 列7 列8 列9 列10 列1 列2
bal bal bal bal bal bal bal bal bal bla bal bal bla bal bal bla bal bal bla bla bla bla
blo blo blo blo blo blo blo blo blo blo blo blo blo blo blo blo blo bal bla bla bla bla
bli bli bli bli bli bli bli bli bli bli bli bli bli bli bli bli bli bal bla bla bla bla

这是有关Quarto中的页面布局的一些额外信息。

英文:

Maybe you want to use page-layout: full in your YAML header like this:

---
title: "Test"
editor: visual
format: 
  html:
    page-layout: full
---

## Quarto

| Col1 | Col2 | Col3 | Col4 | Col5 | Col6 | Col7 | Col8 | Col9 | Col10 | Col1 | Col2 | Col3 | Col4 | Col5 | Col6 | Col7 | Col8 | Col9 | Col10 | Col1 | Col2
|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|------
| bal  | bal  | bal  | bal  | bal  | bal  | bal  | bal  | bal  | bla  | bal  | bal  | bla  | bal  | bal  | bla  | bal | bal  | bla  | bla  | bla  | bla    
| blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo  | blo | bal  | bla  | bla  | bla  | bla     
| bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli  | bli | bal  | bla  | bla  | bla  | bla   

Here is some extra information about Page Layout in Quarto.

huangapple
  • 本文由 发表于 2023年1月8日 23:30:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/75049013.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定