position:absolute是什么意思?

太古盟约 2002-04-02 04:47:14
position:absolute是什么意思?
...全文
6111 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
太古盟约 2002-04-02
  • 打赏
  • 举报
回复
To :chenzengxi(懒猫)

Thank You! 10分
chenzengxi 2002-04-02
  • 打赏
  • 举报
回复
就是绝对位置.
比如可以通过 <div style="position:absolute; top:100; left:100">aa</div>
来设置元素div的屏幕显示位置
太古盟约 2002-04-02
  • 打赏
  • 举报
回复
比较简单的东西,麻烦大虾了,小弟英语不好,给讲讲吧

position

--------------------------------------------------------------------------------

Description

Retrieves the type of positioning used for the element.

Syntax
object.style.position



Remarks

The default is static, which means there is no special positioning, and the element obeys the layout rules of HTML.

An absolutely positioned element is always relative to either the next positioned parent or, if there isn't one, the BODY by default. Values for left and top are relative to the upper-left corner of the next positioned element in the hierarchy. Be sure to note the Applies To listings for elements that can be relatively and absolutely positioned.

See Positioning for an overview on how to use dynamic positioning.

The property has read-only permission.


Applies To

HTML Tags For position:absolute

APPLET, DIV, EMBED, FIELDSET, HR, IFRAME, IMG, INPUT, INPUT type=button, OBJECT, MARQUEE, SELECT, SPAN, TABLE, TEXTAREA

For position:relative

A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, CENTER, CITE, CODE, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FORM, H1, H2, H3, H4, H5, H6, HR, I, IFRAME, IMG, INPUT, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP

Scripting style

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧