Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- RTL88x2BU
- disabled
- Injection
- replace
- ajax
- PHP GCM
- synology
- 커널
- AC1300
- jQuery
- javascript
- include
- utf-8
- form
- submit
- 따라다니는 배너
- 크로스 컴파일
- euc-kr
- Getrows
- XMLHTTP
- SQL Injection
- jquery 레이어
- lsusb
- 시놀로지
- 무선랜카드
- println
- ASP
- readonly
- DS718+
- FileSystemObject
Archives
- Today
- Total
아는 것이 좋은 것이다.
[CSS] 체크박스 이미지 변환 본문
<html>
<head>
<title>체크 박스 이미지로 구현</title>
</head>
<body>
<style type="text/css">
.custom_checkbox {position:relative; margin:45px 0 0 20px;}
label.image_checkbox {position:absolute; left:0; height:26px; padding:4px 0 0 30px; background:url('이미지경로') no-repeat;}
input[type="checkbox"]:checked.image_checkbox + label.image_checkbox {background-position:0 -30px;}
</style>
<div class="custom_checkbox">
<h2>커스텀 체크박스</h2>
<input type="checkbox" id="custom" name="normal" class="image_checkbox">
<label for="custom" class="image_checkbox">커스텀 체크박스1</label>
<br><br>
<input type="checkbox" id="custom2" name="normal" class="image_checkbox">
<label for="custom2" class="image_checkbox">커스텀 체크박스2</label>
</div>
</body>
</html>
* 이미지를 박아 넣고 클릭시 위아래로 이미지가 이동하여 체크가 된건지 안된건지 이미지로 구분 가능
○ ● |
이런식의 이미지를 만든후 위의 CSS 백그라운드에 경로지정하여 넣어주면 된다. 사이즈는 해당 이미지에 맞게 조절하면 된다.
(위의 ○는 체크해제 이미지, 아래 ●는 체크된 이미지)
'CSS' 카테고리의 다른 글
[CSS] IE6~9브라우저에서 CSS3사용하기(버전별 버그 해결) (0) | 2014.05.26 |
---|---|
[CSS] 해상도별 스타일 css 적용 (0) | 2014.05.26 |
[CSS] input 특정언어 지정 입력 (0) | 2014.05.10 |
[CSS] 스크롤 따라다니는 배너 (스크립트X) (1) | 2014.05.10 |
[CSS] css 버튼생성 사이트 (0) | 2014.05.10 |
Comments