关于li光标的选择下降

时间:2015-12-23 12:34:13

标签: javascript jquery html css

我已经对div中的单词实施了自动提示,在按up并且down选择了#cont_div, #cont_text, #demo { resize: none; font-size: 15px; line-height: 19px; -webkit-line-height: 19px; -moz-line-height: 19px; -o-line-height: 19px; font-family: Arial; display: inline-block; width: 50%; border: none; outline: none; background: #FFF; box-shadow: 0 0 10px #CCC !important; overflow-y: auto; color: #262626; overflow-x: hidden; min-height: 500px; -webkit-overflow-scrolling: touch; margin: 0px auto; padding: 40px; -webkit-appearance: none; -webkit-box-shadow: 0 0 10px #CCC !important; -moz-box-shadow: 0 0 10px #CCC !important; } li{ cursor:pointer; }箭头后,该单词将显示在精确的光标位置,但光标也会下降。



<div id="demo" contenteditable="true">
    <ul style="overflow-y: scroll; height: 100px;">
        <li><a>a</a></li>
        <li><a>b</a></li>
        <li><a>c</a></li>
        <li><a>a</a></li>
        <li><a>b</a></li>
        <li><a>c</a></li>
        <li><a>a</a></li>
        <li><a>b</a></li>
        <li><a>c</a></li>
        <li><a>a</a></li>
        <li><a>b</a></li>
        <li><a>c</a></li>
    </ul>
</div>
&#13;
public ActionResult Rajasthan()
{
    //List<PackageGallery> all = new List<PackageGallery>();
    using (travelAndTourismEntities objentity = new travelAndTourismEntities())
    {
        List<PackageGallery> all = (from p in objentity.PackageGalleries where p.ParentCategory == "Rajasthan" orderby p.Imageid select p).ToList();

        // all = objentity.PackageGalleries.ToList();
        return View(all);
    }
}
&#13;
&#13;
&#13;

我只想把光标放在那个位置..,有什么建议吗?

0 个答案:

没有答案