将一系列 p 流制作成“两页跨页”

发布于 2024-09-28 06:34:59 字数 378 浏览 1 评论 0原文

最近,一个学生偶然得到了这个(或者是错误的 xhtml/css 的副作用)。这是否可以通过跨浏览器、自动的方式(比如 Wordpress 文章和自定义 html/css)来完成? (即,没有 php 脚本之类的。)

我的一个目标是创建一个读起来“像一本书”而不是卷轴的网站。

有想法吗?

编辑:我应该明确目标。就是用f.ex写一篇带图片的文字。 TinyMCE 等,并呈现其排版和布局质量以及经典技术杂志(例如早期 BYTE 跨页或科学对开本)的“概览性”。如果没有 CSS 技巧可以自动处理溢出,我会接受 php 解决方案。我想要“摆脱”的是手动将 5 页文章分成几栏的需要。

也许 LyX 可以生成像样的 HTML,每 2 页跨页 1 个文件?这将是一个可以接受的解决方案。

Recently a student got this quite by accident (or well, a side effect of incorrect xhtml/css). Is this possible to do in a cross-browser, automatic way with say a Wordpress article and custom html/css? (I.e., no php script or such.)

It's been a goal for me to at one point make a site that reads "like a book" rather than a scroll.

Ideas?

Edit: I should make the goal clear. It is to write a text with pictures using f.ex. TinyMCE or the like, and present it with typography and layout quality and 'overviewability' of classic technical magazines such as the early BYTE spreads, or science folios. I'll accept a php solution if no CSS trick will handle the overflow automatically. What I want to 'get rid of' is the need to manually chop up the say 5-page article into columns.

Perhaps LyX can generate out decent HTML with 1 file per 2-page spread? That would be an acceptable solution.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

要走干脆点 2024-10-05 06:34:59

CSS 3 允许流动的“报纸栏”(如果这就是您的意思)。

http://www.w3.org/TR/css3-multicol/

最新 至少基于 Gecko 和 Webkit 的浏览器支持它,但可能需要特定于供应商的前缀:

http://www.css3.info/preview/multi-column-layout/

CSS 3 allows flowing "newspaper columns" if that is what you mean.

http://www.w3.org/TR/css3-multicol/

Most current At least Gecko and Webkit based browsers support it, but may require vendor-specific prefixes:

http://www.css3.info/preview/multi-column-layout/

各自安好 2024-10-05 06:34:59

如果你使用这样的东西:

<p>text1</p>
<p>text2</p>
<p>text3</p>
<p>text4</p>

并给出以下样式:

p { float: left; }

它应该并排放置每个 P。然而,有多少个 P 并排取决于可用的宽度,因此,如果您定义每个 P 占 200px,并且容器中的总宽度为 400px,则最终结果将是两个 P 并排,像这样的东西:

text1 text2
text3 text4

请注意,如果 P 的内容长度不一样,这看起来不会那么好(或者工作得那么好)。如果您还需要将尺寸自动拆分为此类列,我认为仅使用 CSS 就没有一种巧妙的方法。

顺便说一句,我见过一些网站这样做。 这并不是一个好主意。它适用于纸张和杂志,但根据我的经验,在屏幕上效果不佳。除非我弄错了,否则也有一些研究得出了同样的结论。

If you use something like this:

<p>text1</p>
<p>text2</p>
<p>text3</p>
<p>text4</p>

And give the following style:

p { float: left; }

It should place each P side by side. However, how many P's go side by side depends on how much width is available, so if you define that each P take, say 200px, and the total width in the container is 400px, the end result would be two P's side by side, something like this:

text1 text2
text3 text4

Do note that this will not look so good (or work so well) if the contents of the P's aren't about the same length. I don't think there's a neat way of doing it just with CSS if you need the sizes to automatically split into such columns as well.

As a side note, I've seen some sites which do this. It's not really a that good idea. It works on paper and magazines, but not so well on screen in my experience. Unless I'm mistaken, there have also been some studies about this coming to the same conclusion.

迷乱花海 2024-10-05 06:34:59

正如 Jani 所说,由于人们通常在网络上阅读的方式,我不确定 2 栏布局在网络上是否能很好地工作。我个人不建议像网站那样的文章采用两栏布局。

另外,我不确定您是否可以在不使用动态脚本的情况下创建它,除非您指定每个部分的副本数量,否则用户将非常容易给出未匹配的列。

As Jani says I'm not sure 2 column layout works very well in web, because of the way people generally read on the web. I would personally not recommend a 2 column layout for articles like that for a web site.

Also I am not sure there is anyway you could create that without using dynamic scripting, unless you dictate the amount of copy for each section, otherwise it would be spectacularly easy for the user to give miss matched columns.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文