Bootstrap 3

[basic] BS3 - Input2 (BS입력창2 = BS인풋2) 일반텍스트 + Input Group(BS인풋그룹) + 아이콘추가 + 폼제어상태


Static Control (정적 제어요소 = 일반텍스트 추가)

 

<form class="form-horizontal">

  <div class="form-group">

    <label class="control-label col-sm-2" for="email">Email:</label>

    <div class="col-sm-10">

      <p class="form-control-static"></p>

    </div>

  </div>

</form>

 

예제보기


Input Group (인풋그룹) + 입력창 앞 아이콘 + 입력창 뒤 아이콘

Input 에 아이콘 배치 : .input-group-addon 클래스 이용. 

 

<form>

  <div class="input-group">

    <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>

    <input id="email" type="text" class="form-control" name="email" placeholder="Email">

  </div>

  <div class="input-group">

    <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>

    <input id="password" type="password" class="form-control" name="password" placeholder="Password">

  </div>

  <div class="input-group">

    <span class="input-group-addon">Text</span>

    <input id="msg" type="text" class="form-control" name="msg" placeholder="Additional Info">

  </div>

</form>

 

예제보기 


Input 에 아이콘 배치 : .input-group-btn 클래스 이용.

 

<form>

  <div class="input-group">

    <input type="text" class="form-control" placeholder="Search">

    <div class="input-group-btn">

      <button class="btn btn-default" type="submit">

        <i class="glyphicon glyphicon-search"></i>

      </button>

    </div>

  </div>

</form>

 

예제보기 

 

BS Form Control State (폼제어상태) - 수평폼 경우

 

<form class="form-horizontal">

  <div class="form-group">

    <label class="col-sm-2 control-label">Focused</label>

    <div class="col-sm-10">

      <input class="form-control" id="focusedInput" type="text" value="Click to focus">

    </div>

  </div>

  <div class="form-group">

    <label for="disabledInput" class="col-sm-2 control-label">Disabled</label>

    <div class="col-sm-10">

      <input class="form-control" id="disabledInput" type="text" disabled>

    </div>

  </div>

  <fieldset disabled>

    <div class="form-group">

      <label for="disabledTextInput" class="col-sm-2 control-label">Fieldset disabled</label>

      <div class="col-sm-10">

        <input type="text" id="disabledTextInput" class="form-control">

      </div>

    </div>

    <div class="form-group">

      <label for="disabledSelect" class="col-sm-2 control-label"></label>

      <div class="col-sm-10">

        <select id="disabledSelect" class="form-control">

          <option>Disabled select</option>

        </select>

      </div>

    </div>

  </fieldset>

  <div class="form-group has-success has-feedback">

    <label class="col-sm-2 control-label" for="inputSuccess">

    Input with success and icon</label>

    <div class="col-sm-10">

      <input type="text" class="form-control" id="inputSuccess">

      <span class="glyphicon glyphicon-ok form-control-feedback"></span>

    </div>

  </div>

  <div class="form-group has-warning has-feedback">

    <label class="col-sm-2 control-label" for="inputWarning">

    Input with warning and icon</label>

    <div class="col-sm-10">

      <input type="text" class="form-control" id="inputWarning">

      <span class="glyphicon glyphicon-warning-sign form-control-feedback"></span>

    </div>

  </div>

  <div class="form-group has-error has-feedback">

    <label class="col-sm-2 control-label" for="inputError">

    Input with error and icon</label>

    <div class="col-sm-10">

      <input type="text" class="form-control" id="inputError">

      <span class="glyphicon glyphicon-remove form-control-feedback"></span>

    </div>

  </div>

</form>

 

예제보기 

 

BS Form Control State (폼제어상태) - 인라인폼 경우

 

<form class="form-inline">

  <div class="form-group">

    <label for="focusedInput">Focused</label>

    <input class="form-control" id="focusedInput" type="text">

  </div>

  <div class="form-group">

    <label for="disabledInput">Disabled</label>

    <input class="form-control" id="disabledInput" type="text" disabled>

  </div>

  <div class="form-group has-success has-feedback">

    <label for="inputSuccess2">Input with success</label>

    <input type="text" class="form-control" id="inputSuccess2">

    <span class="glyphicon glyphicon-ok form-control-feedback"></span>

  </div>

  <div class="form-group has-warning has-feedback">

    <label for="inputWarning2">Input with warning</label>

    <input type="text" class="form-control" id="inputWarning2">

    <span class="glyphicon glyphicon-warning-sign form-control-feedback"></span>

  </div>

  <div class="form-group has-error has-feedback">

    <label for="inputError2">Input with error</label>

    <input type="text" class="form-control" id="inputError2">

    <span class="glyphicon glyphicon-remove form-control-feedback"></span>

  </div>

</form>

 

예제보기

 

 

[참고]

 

.form-horizontal .form-group {

    margin-right: -15px;

    margin-left: -15px;

}

 

.has-feedback {

    position: relative;

}

 

.input-group {

    position: relative;

    display: table;

    border-collapse: separate;

}

 


방문 감사합니다. (즐겨찾기 등록: Ctrl + D)

분류 제목
basic BS3 - HOME (소개) - BS3 vs BS4 차이 (= BS차이)
basic BS3 - Start (시작) ★ - BS다운 / BSCDN / BS구문
basic BS3 - Grid (그리드) ★★★ - (BS3그리드 vs BS4그리드)
basic BS3 - Text/Typography(BS글자 = BS텍스트) (= BS4글자 vs BS3글자) BS글자색
basic BS3 - Table (BS테이블) - 테이블테두리 + 테이블배경색 + 반응형테이블
basic BS3 - Image (BS이미지) - 반응형이미지 + 반응형동영상 + 이미지정렬
basic BS3 - Jumbotron/page-header (BS점보트론 / BS페이지헤더) - 큰글씨, 글자키우기
basic BS3 - Well (BS웰 = BS회색상자) ★ - BS회색배경상자 (= BS회색박스 = BS웰클래스)
basic BS3 - Alert (BS경고 = BS얼럿 = BS경보) - 배경색 + 글자색 + 링크색 + 닫기 + 애니…
basic BS3 - Button (BS버튼) ★ - 버튼색깔 + 버튼크기 + 버튼활성화 + 버튼비활성화
basic BS3 - Button Group (BS버튼그룹) ★
basic BS3 - Icon (아이콘) - Glyphicon/Font Awesome/Google Material De…
basic BS3 - Progress Bar (BS진행바 = BS진행상태표시 = BS진도바 = BS프로그레스바) - I…
basic BS3 - Pagination (BS페이징 = BS페이지번호 = BS페이징 = BS패지네이션) + Bread…
basic BS3 - Pager (BS페이저) - 이전페이지/다음페이지 (= 앞으로가기/뒤로가기)
1/4
목록
  • 채팅방
  • 필독
1. 채팅창 헤드에서 접속자 확인 2. 닉네임 클릭해 1:1 채팅 가능 3. 닉네임 클릭해 귓속말 가능 4. 닉네임 클릭해 호출하기 가능 5. 우하단 클릭해 환경 설정 가능 6. 의뢰글 작성 후 의뢰 상담 가능 7. 질문글 작성 후 질문 상담 가능 8. 채팅방에 개인정보 입력 금지 9. 채팅방에 광고 욕설 비방 금지
 홈  PC버전 로그인 일본어
웹디자인언어
서버관리언어
고급코딩언어
그누보드 1
제작의뢰
Q&A
커뮤니티 1
웹유틸
회원센터
홈짱 PC버전 로그인