More than 1 year has passed since last update.

サンプル

html

qiita.html
<form id="login" name="login" method="post" action="#" class="login-area">
    <fieldset>
        <dl>
            <dt>ユーザーIDを入力</dt>
            <dd class="user">
                <label for="userid">
                    <span>ユーザーID</span>
                </label>
                <div>
                    <input type="text" id="userid" name="userid" value="" />
                </div>
            </dd>
            <dt>パスワードを入力</dt>
            <dd class="lock">
                <label for="password">
                    <span>パスワード</span>
                </label>
                <div>
                    <input type="password" id="password" name="password" maxlength="64" />
                </div>
            </dd>
        </dl>
    </fieldset>
    <p>
        <button type="submit">送信</button>
    </p>
    <input type="hidden" name="formcmd" value="" />
</form>

css

qiita.css
body,dl,dd,p {
    margin: 0;
    padding: 0;
}

body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ------------------------------
  基本プロパティ
------------------------------ */
.login-area {
    margin: 10px;
    padding: 15px 10px;
    border: 1px solid #CCC;
}

.login-area fieldset {
    border: none;
}

.login-area dl {
    margin-bottom: 10px;
}

.login-area dl dt {
    margin-bottom: 3px;
}

.login-area dl dd {
    position: relative;
    height: 36px;
    margin-bottom: 20px;
    border: 1px solid #DDD;
}

.login-area dl dd label {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border-right: 1px solid #DDD;
    text-align: center;
}

.login-area dl dd label span {
    visibility: hidden;
}

.login-area dl dd input,
.login-area dl dd div {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background: #FEFEFE;
    border: none;
}

.login-area dl dd input {
    width: 100%;
    height: 36px;
    padding: 10px 0;
    outline: none;
}

.login-area dl dd div {
    height: 36px;
    margin: 0;
    padding: 0 10px 0 45px;
}

/* ------------------------------
  アイコン
------------------------------ */
.login-area dl dd label:before,
.login-area dl dd label:after {
    content: "";
    position: absolute;
    top: 50%;
}

/* ユーザーアイコン
----------------------*/
.login-area dl dd.user label:before,
.login-area dl dd.user label:after {
    margin-left: 6px;
}

/* 頭部 */
.login-area dl dd.user label:before {
    left: 9px;
    width: 6px;
    height: 10px;
    margin-top: -7px;
    border-top-right-radius: 5px;
    -moz-border-top-right-radius: 5px;
    -webkit-border-top-right-radius: 5px;
    border-top-left-radius: 5px;
    -moz-border-top-left-radius: 5px;
    -webkit-border-top-left-radius: 5px;
    border-bottom-right-radius: 5px 10px;
    -moz-border-bottom-right-radius: 5px 10px;
    -webkit-border-bottom-right-radius: 5px 10px;
    border-bottom-left-radius: 5px 10px;
    -moz-border-bottom-left-radius: 5px 10px;
    -webkit-border-bottom-left-radius: 5px 10px;
    border-radius: 5px 5px 5px 5px/5px 5px 10px 10px;
    -moz-border-radius: 5px 5px 5px 5px/5px 5px 10px 10px;
    -webkit-border-radius: 5px 5px 5px 5px/5px 5px 10px 10px;
    background: #FF9901;
}

/* 体 */
.login-area dl dd.user label:after {
    left: 4px;
    width: 16px;
    height: 5px;
    margin-top: 1px;
    border-top-right-radius: 5px;
    -moz-border-top-right-radius: 5px;
    -webkit-border-top-right-radius: 5px;
    border-top-left-radius: 5px;
    -moz-border-top-left-radius: 5px;
    -webkit-border-top-left-radius: 5px;
    border-radius: 5px 5px 0 0;
    -moz-border-radius: 5px 5px 0 0;
    -webkit-border-radius: 5px 5px 0 0;
    background: #FF9901;
}

/* 錠アイコン
----------------------*/
/* 位置と形 */
.login-area dl dd.lock:before,
.login-area dl dd.lock:after {
    left: 16px;
    z-index: 10;
    width: 3px;
    height: 3px;
    margin-top: 0;
    background: #fff;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
}

.login-area dl dd.lock label:before,
.login-area dl dd.lock label:after {
    top: 55%;
}

/* 上側 */
.login-area dl dd.lock:before {
    left: 17px;
    width: 1px;
    height: 4px;
    margin-top: 2px;
}

.login-area dl dd.lock label:before {
    left: 13px;
    width: 5px;
    height: 5px;
    margin-top: -11px;
    border: 2px solid #FF9901;
    border-bottom: 0;
    background: transparent;
    -moz-border-radius: 5px 5px 0 0;
    -webkit-border-radius: 5px 5px 0 0;
    border-radius: 5px 5px 0 0;
}

/* 下側 */
.login-area dl dd.lock label:after {
    left: 11px;
    width: 13px;
    height: 10px;
    margin-top: -4px;
    background: #FF9901;
}

/* ------------------------------
  ボタン
------------------------------ */
.login-area p {
    margin-bottom: 12px;
    padding: 0 13px;
}

.login-area button {
    width: 100%;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #f6f6f6));
    background: -webkit-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
    background: -moz-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
    background: linear-gradient(to bottom, #ffffff 5%, #f6f6f6 100%);
    background-color: #ffffff;
    border-radius: 6px;
    border: 1px solid #ddd;
    cursor: pointer;
    padding: 10px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: 000;
    text-shadow: 1px 1px 1px #dcdcdc;
}

.login-area button:hover {
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f6f6f6), color-stop(1, #ffffff));
    background: -webkit-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
    background: linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%);
    background-color: #f6f6f6;
}