水平对文本输入区域

编程入门 行业动态 更新时间:2024-10-27 02:21:17
水平对文本输入区域 - 一个顶部低于另一个(Horizontal pair of text input areas - top of one is lower than the other)

左侧的文本输入区域在底部排列,右侧是文本区域。

我希望他们在顶部排成一列。 (单词“为什么”将垂直放置在与“是这个”相同的位置。)如何使用CSS实现此目的,或者没有复杂的解决方案,例如在用户键入和主动更改时读取元素的新高度通过JS / JQ等匹配的盒子高度?


http://64.179.188.97/memory3/login.php

用户:testuser

密码:1234

The text input area on the left side lines up at the bottom with the text area on the right.

I want them to line up together at the top. (The word "why" would be vertically placed in the same position as the words "is this.") How can I achieve this with CSS, or without a complex solution such as reading the element's new height while the user types and actively changing the boxes heights to match via JS/JQ, etc.?


http://64.179.188.97/memory3/login.php

User: testuser

Password: 1234

最满意答案

如果你希望它们具有不同的高度,但是在顶部对齐,你只需要给你的元素一个vertical-align: top; 。

结果

在此处输入图像描述

If you want them to be different heights, but aligned at the top, you just need to give your element a vertical-align: top;.

Result

enter image description here

更多推荐

本文发布于:2023-07-05 15:52:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1039160.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本   水平   区域

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!