zoukankan      html  css  js  c++  java
  • 一个简单的输入框移入后显示下拉列表

    因为工作以后,一直做Js,所以css只能是练习。哈哈

    这个下拉列表,的宽度是固定的最好,如果不是固定的很难看的,所以最好有输入字体的限制。

       .test { 310px;margin-left: auto;margin-right:auto;position: relative;}
        .test input{ 300px;height: 30px;margin-top: 100px;}
        .test ul{list-style: none; display: block; 300px;position: absolute;left: -35px;top: 120px;}
        .test ul li{border: 1px solid red; 100%;height: 30px;}
    </style>
    </head>
        
    <body style="text-align:center;padding:0;margin:0">
    <div class='test'>
        <input type='text'>
        <ul>
            <li>不管爱与不爱,都是历史的尘埃不管爱与不爱,都是历史的尘埃</li>
            <li>不管爱与不爱,都是历史的尘埃不管爱与不爱,都是历史的尘埃</li>
            <li>不管爱与不爱,都是历史的尘埃不管爱与不爱,都是历史的尘埃</li>
    
        </ul>
    </div>
    <script type="text/javascript" src='jquery-1.11.js'></script>
    <script type="text/javascript">
        $(".test input").hover( function () {
            $(".test ul").show();
        },function(){
            //$(".test ul").hide();
        });
    </script>

     =========

    显示y轴方向的滚动条

  • 相关阅读:
    WPF DataGrid
    邮箱格式验证
    Spring Cloud微服务学习笔记
    你必须知道的MySQL知识点
    你必须掌握的分布式事务知识点
    重试操作下如何实现幂等?
    你必须掌握的关于JVM知识点
    RocketMQ开发者指南
    二分查找解题套路框架
    回溯算法解题套路框架
  • 原文地址:https://www.cnblogs.com/coding4/p/5572129.html
Copyright © 2011-2022 走看看