好玩的search載入css,好玩search載入css

來源:互聯網
上載者:User

好玩的search載入css,好玩search載入css


body{           margin-top:50px;        }        .s-body        {            width:400px;            margin-left:auto;margin-right:auto;        }        .s-input        {            border:1px solid #ccc;            padding:2px 4px 2px 4px ;            border-radius:3px;            box-shadow:rgba(22,22,22,.1) 0px 1px 1px;        }        .s-input input        {            width:325px;            border:0px solid #ccc;            outline:none;            height:25px;            font-size:16px;                    }        .s-input button        {            margin-top:-2px;            margin-right:-4px;            float:right;            border-width:0px;            outline:none;            padding:9px 19px;            line-height:100%;            background-color:rgba(190,26,33,.7);            color:#fff;            letter-spacing: 1px;            font-weight:bold;        }        .s-input.loding input        {            width:290px;        }        .s-input input:disabled        {            color:rgba(0,0,0,.7);            background-color:#fff;        }        .s-input.loding button{            background-color:rgba(190,26,33,.91);            animation:stretchdelay 4s infinite ease-in-out;            -webkit-animation:stretchdelay 4s infinite ease-in-out;        }        .s-input.loding button:before        {            content:"正在";        }        @-webkit-keyframes stretchdelay {          50% { -webkit-transform: translateX(-300px) }           0% { -webkit-transform: translateX(0px) }        }        @keyframes stretchdelay {            50%            {                transform:translateX(-300px);                -webkit-transform:translateX(-300px);            }            0%            {                transform:translateX(0px);                -webkit-transform:translateX(0px);            }        }        .s-input button:hover        {            background-color:rgba(190,26,33,1);            cursor:pointer;        }

$(function () {            $(".s-input button").click(function () {                if ($(this).parent().hasClass("loding"))                {                    $(this).parent().removeClass("loding").children("input").prop("disabled", false).focus();                } else                {                    $(this).parent().addClass("loding").children("input").prop("disabled", true);                }            });        })

    <div class="s-body">        <div class="s-input">            <input type="text"/>            <button type="button">搜尋</button>        </div>    </div>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.