input框focus時的美化效果

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>input框的focus美化效果</title>
    <link href="lt.css" rel="stylesheet" type="text/css"/>

    <style>

        ul{width: 260px;margin: 10px auto;}
        ul li{width:260px;height:60px;line-height: 60px;}
        input{
            border: 1px solid #ccc;
            border-radius: 2px;
            color: #000;
            font-family: 'Open Sans', sans-serif;
            font-size: 1em;
            height: 50px;
            padding: 0 16px;
            transition: background 0.3s ease-in-out;
            width: 100%;
        }
        input:focus {
            outline: none;
            border-color: #9ecaed;
            box-shadow: 0 0 10px #9ecaed;
        }

        .button{
            -webkit-appearance: none;
            background: #009dff;
            border: none;
            border-radius: 2px;
            color: #fff;
            cursor: pointer;
            height: 50px;
            font-family: 'Open Sans', sans-serif;
            font-size: 1.2em;
            letter-spacing: 0.05em;
            text-align: center;
            text-transform: uppercase;
            transition: background 0.3s ease-in-out;
            width: 292px;
        }
        .button:hover {

            background: #00c8ff;
        }
    </style>
</head>
<body>

    <ul>
        <li>
            <input type="text" placeholder="用戶名" autocomplete="on"/>
        </li>
        <li>
            <input type="text" placeholder="密碼" autocomplete="off"/>
        </li>
        <li>
            <input type="text" placeholder="手機號碼" autocomplete="off"/>
        </li>
        <li>
            <input type="text" placeholder="郵箱" autocomplete="off"/>
        </li>

        <li>
            <input type="submit" class="button" title="註冊" value="註冊">
        </li>
    </ul>

</body>
</html>

效果圖:css

IT技術和行業交流羣 417691667html

相關文章
相關標籤/搜索