当前位置:  开发笔记 > 编程语言 > 正文

在HTML中做侧注的可靠方法是什么?

如何解决《在HTML中做侧注的可靠方法是什么?》经验,为你挑选了1个好方法。

我在网上发布了很多文字,甚至为我编写了一个格式化HTML 的系统.现在,我遇到了一个问题:我想在HTML页面中制作旁注,就像书本一样.只是为了解释,旁注是主体文本旁边边缘的那些注释.

有没有人知道一个好的,可靠的方法来做到这一点 - 最好用纯CSS而不是JavaScript.谢谢!



1> cletus..:

好的,这使得浏览器友好(FF3,IE7/8,Chrome):



  Layout
  


In the 90s we saw the rise of GUIs (yes I know Macs were around in the 80s but GUIs became the standard for everyone once Windows took hold). This transition had many casualties like Lotus 1-2-3 (which was basically killed by Excel on Windows) and Wordperfect (MS Word killed it). Now you can argue that MS had the inside track since they also produced Windows and you'd be right but beyond that I think MS adjusted to the change quicker than anyone else.

Borland was still an agile little company back then. It adjusted and took its highly successful Turbo Pascal and created Delphi.

See Chapter 7 for further explanation

Now truly compiled languages ruled the roost in the 1990s with the exception of one little upstart: Java, which was something basically new. It was sorta compiled, sorta interpreted (being compiled into machine-independent bytecode that ran on a virtual machine). I personally think that the rise of both Java and Netscape scared the absolute bejesus out of Microsoft in the late 90s.

See Chapter 9 for further explanation

Borland adjusted reasonably well producing what was really the first really successful Java IDE in JBuilder.

They were fending off a resurgent Microsoft who also produced successive versions of Visual Studio that (imho) were years ahead of their time in the late 90s. I can remember coding Visual C++ with MTS (microsoft Transaction Server) DCOM objects over 10 years ago and that was a precursor to the modern application server platform we have today. Remote debugging and the like were things that were (or at least seemed) light years ahead on Visual Studio.

注意:为了响应文本选择问题,我尝试使用绝对定位,您可以通过更改此CSS来执行此操作:

div.sidenote-left { position: absolute; margin-left: -150px; }
div.sidenote-right { position: absolute; margin-left: 660px; }

但它仍然选择文本.

我看到的唯一方法是将页面更改为2/3列格式,其中侧边注释在其他列中.唯一的问题是你失去了相对于文本移动笔记的能力.或者至少我想不出办法解决这个问题.

推荐阅读
135369一生真爱_890
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有