【问题标题】:Place HTML element in the bottom of web page [duplicate]将 HTML 元素放在网页底部 [重复]
【发布时间】:2016-02-25 14:50:32
【问题描述】:

如何将Surname输入的HTML元素放在HTML页面底部?

<head>
</head>
<body>
    Name <input value ="aaa" >
    Surname <input value = "ccc" >
</body>
</html>

目前它位于页面顶部。与使用许多&lt;br&gt; 标签相比,将其置于页面底部的更好解决方案是什么?

【问题讨论】:

    标签: html css


    【解决方案1】:

    首先将您的标签和输入包装在某个容器中并为其添加一个类(例如 .custom_input),然后在新元素的 css 之后:

    body{ position:relative; }
    .custom_input{position:absolute; bottom:0; left:0;}

    【讨论】:

      猜你喜欢
      • 2014-04-21
      • 1970-01-01
      • 2020-01-02
      • 2020-04-29
      • 1970-01-01
      • 2013-10-27
      • 2020-10-03
      • 2021-01-21
      • 2021-07-13
      相关资源
      最近更新 更多