怎样精确地将一个字符定位在表格的任意地方,谢谢!

ATCG 2004-05-03 04:52:25
怎样精确地将一个字符定位在表格的任意地方,
比如<TABLE WIDTH=100 border=1><TR><TD WIDTH=100>A</td></tr></table>
由于宽度是100,我想将这个A定位在1的位置,或者71的位置等等,行不?
...全文
56 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
ATCG 2004-05-03
  • 打赏
  • 举报
回复
明白了,多谢了!!!
wanghr100 2004-05-03
  • 打赏
  • 举报
回复
position:relative;left:71

position:solute;left:71
有什么区别

position:solute;left:71
->
position:absolute; //这是绝对位置.

不要用绝对位置.绝对位置是相对于body的位置
你可以看一下,这样的效果.

绝对位置.
<TABLE WIDTH=100 border=1><TR><TD WIDTH=100><div style="position:absolute;left:71" >A</div></td></tr></table>

相对位置. 相对位置,是相对于上一个元素的位置.就是相对td
<TABLE WIDTH=100 border=1><TR><TD WIDTH=100><div style="position:relative;left:71" >A</div></td></tr></table>

cybernaute 2004-05-03
  • 打赏
  • 举报
回复
static: Default. The element is positioned according to the normal flow of the page. The Top and Left attributes are ignored. If the object is anchored inline, which only happens in Microsoft Word, this value is used.
absolute: The element is positioned relative to the parent, using the Top and Left attributes. This value is used by Microsoft Word and Microsoft Excel floating objects, and Microsoft PowerPoint slides.
relative: The element is positioned according to the normal flow of the page, but the Top and Left attributes are used. The overlap of overlapping elements is governed by the Z-Index attribute.
ATCG 2004-05-03
  • 打赏
  • 举报
回复
谢谢!请问
position:relative;left:71

position:solute;left:71
有什么区别
trl830618 2004-05-03
  • 打赏
  • 举报
回复
你可以尝试用CSS样式来定位对象的位置
<TABLE WIDTH=100 border=1><TR><TD WIDTH=100><div style="position:solute;left:71" >A</div></td></tr></table>
wanghr100 2004-05-03
  • 打赏
  • 举报
回复
<TABLE WIDTH=100 border=1><TR><TD WIDTH=100><div style="position:relative;left:71" >A</div></td></tr></table>

87,992

社区成员

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

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