Javascript 向html添加静态内容表
现在我想将“目录”添加到help.html的右侧,以便用户可以轻松访问help.html中的适当位置Javascript 向html添加静态内容表,javascript,html,tags,Javascript,Html,Tags,现在我想将“目录”添加到help.html的右侧,以便用户可以轻松访问help.html中的适当位置 ===== ==== tag1 tag2 ===== ==== -------------------- help.html Intro some intro. basics some basic info. and more contents -------------------- ======
===== ====
tag1 tag2
===== ====
--------------------
help.html
Intro
some intro.
basics
some basic info.
and more contents
--------------------
========
tag1 tag2
===== ====
--------------------
help.html Intro可以通过CSS使用位置:fixed
属性轻松完成:
===== ====
tag1 tag2
===== ====
--------------------
help.html Intro <----|
basics <---| new thing I would like to add
topic3 <---|
Intro
some intro
basics
some basic info.
and more contents
--------------------
请参见我的演示:
===== ====
tag1 tag2
===== ====
--------------------
help.html Intro <----|
basics <---| new thing I would like to add
topic3 <---|
Intro
some intro
basics
some basic info.
and more contents
--------------------
div.table-of-contents {
position: fixed;
right: 30px;
top: 30px;
}