Story/html/css
홈페이지제작시 특정 input 속성에만 스타일을 지정할때 Styling Texty Inputs Only
Stdio
2013. 12. 11. 15:04
반응형
- input type text 에만 적용할때 -
input[type=text] {
/* Awesome styling */
}
- input type text,url 등 여러가지를 적용할때 -
input[type=text],
input[type=url],
input[type=tel],
input[type=number],
input[type=color],
input[type=email], {
/* And that ain't all of them... */
}
- input type submit,file 은 제외할때 -
input:not([type=submit]):not([type=file]) {
/* omg so much cleaner */
}
:not 등의 selector 가 ie9 이하는 지원되지 않는다.
아래와같이 사용해서 이용해도된다.
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
출처 : http://css-tricks.com/styling-texty-inputs-only/
반응형