【发布时间】:2017-04-05 06:05:07
【问题描述】:
如何做到这一点将鼠标悬停在两个元素之间的边界上(这里在分隔蓝色和红色的垂直线上) 是否可以调整每个元素的宽度?
我正在寻找https://stackedit.io/editor的行为
这是否可以直接通过<textarea> 调整大小的可能性?
* { margin: 0; border: 0; padding: 0; }
textarea { background-color: red; width: 50%; position: absolute; top:0; left:0; height: 100%; }
#separator { cursor: ew-resize; position: absolute; top:0; width:1%; left:50%; height: 100%; }
#right { background-color: blue; width: 49%; position: absolute; top:0; right:0; height: 100%;}
<textarea>hello</textarea>
<div id="separator"></div>
<div id="right">yo</div>
【问题讨论】:
-
可能没有绝对位置。职位:绝对; 意味着位置是绝对的,无论如何不能也不会移动。他们的位置被锁定到坐标
-
@Call_Back_Function 没有 jQuery 是不是很容易?
标签: javascript html css