gpt4 book ai didi

javascript - 我们可以避免闪烁的光标与 div 重叠吗

转载 作者:行者123 更新时间:2023-11-28 18:20:14 24 4
gpt4 key购买 nike

我一直在寻找我们可以处理光标在其他 div 上闪烁的任何方法。为了使我的陈述清楚,我添加了一个屏幕截图 - Screen shot in IE

  1. 灰色的 div 是一个位于顶部的固定位置的 div,用于创建功能区。
  2. 左边带边框的白色区域实际上是一个属性为contentEditable="true"的div,它是一个可编辑区域。 Imp- 可编辑区域的高度可以随着内容增加,即我们不能在那里有滚动条。

因此,当内容超出屏幕并且我们向下滚动时,如果光标已放置在可编辑区域内,它就会出现在功能区上方。

如果选择了图像上可调整大小的边框,也会发生同样的情况。而且,这仅适用于 IE。 Firefox 和 Chrome 没有问题。

代码如下:

<head runat="server">
<title></title>
<style type="text/css">
.wrapper {
width:960px;
height:auto;
min-height:600px;
margin-left:auto;
margin-right:auto;
border-left:1px solid #cfcfcf;
border-right:1px solid #cfcfcf;
box-shadow:0px 10px 10px #6f6f6f;
background-color:#ffffff;
margin-top:100px;
}
.container {
width:100%;
height:auto;
min-height:800px;
padding:10px;
font-family:Arial;
border:1px solid #3f3f3f;
box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
}
.editor-ribbon {
height:100px;
position:fixed;
left:0px;
top:0px;
width:100%;
border-bottom:1px solid #cfcfcf;
width:100%;
background-color: #ffffff;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#f1f1f1', endColorstr = '#e3e3e3');
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr = '#f1f1f1', endColorstr = '#e3e3e3')";
background-image: -moz-linear-gradient(top, #f1f1f1, #e3e3e3);
background-image: -ms-linear-gradient(top, #f1f1f1, #e3e3e3);
background-image: -o-linear-gradient(top, #f1f1f1, #e3e3e3);
background-image: -webkit-gradient(linear, center top, center bottom, from(#f1f1f1), to(#e3e3e3));
background-image: -webkit-linear-gradient(top, #f1f1f1, #e3e3e3);
background-image: linear-gradient(top, #f1f1f1, #e3e3e3);
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="editor-ribbon"></div>
<div class="wrapper">
<div class="container" contenteditable="true">

</div>
</div>
</form>
</body>

最佳答案

在我看来你的答案是:它不会很快被修复

https://connect.microsoft.com/IE/feedback/details/841043/blinking-text-cursor-overlapping-with-div

Blinking text cursor overlapping with div

Status : Closed as Postponed

Description

Text cursor of an input becomes visible over the overlapping div. Text cursor should not become visible, but stay under the overlapping div, since the whole input (or an editable textarea) stay below that div.

关于javascript - 我们可以避免闪烁的光标与 div 重叠吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17085513/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com