我无法让光标知道e-resize
何时mousedown
发生mousemove
事件。我确实设法做到了,但后来它不再起作用了,我忘记了我是如何让它起作用的。
这是jsFiddle中的示例,当您拖动句柄栏时,它的光标不会更改e-resize
为应有的状态。
我在想有某种不正确的cursor: e-resize
分配。
这是当前的CSS:
.container {
width: 500px;
height: 300px;
box-sizing: border-box;
}
.splitter {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.splitter.vertical .leftPane {
position: absolute;
height: 100%;
top: 0;
left: 0;
bottom: 0;
overflow: hidden;
background-color: blue;
margin-right: 5px;
right: 25%;
z-index: 1;
}
.splitter.vertical .rightPane {
position: absolute;
height: 100%;
top: 0;
right: 0;
bottom: 0;
overflow: hidden;
background-color: red;
left: auto;
width: 25%;
z-index: 1;
}
.splitter.vertical .handleBar {
position: absolute;
height: 100%;
top: 0;
bottom: 0;
overflow: hidden;
background-color: green;
right: 25%;
width: 5px;
margin-left: -5px;
z-index: 1;
cursor: e-resize;
}
.splitter.active .handleClone {
position: absolute;
top: 0;
bottom: 0;
background-color: green;
width: 5px;
cursor: e-resize;
z-index: 3;
}
.splitter .content-overlay {
opacity: 0.5;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 2;
display: none;
background-color: black;
}
.splitter.active .content-overlay {
display: block;
}
.splitter.active {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: e-resize;
}
.splitter.hide-right .handleBar {
display: none !important;
}
.splitter.hide-right .rightPane {
display: none !important;
}
.splitter.hide-right .leftPane {
right: 0 !important;
margin-right: 0 !important;
}