반응형 웹에서 이미지 크기 변동시 가로 기준으로 동일 비율로 자동 조절하는 방법CSS .classname {max-width:100%;height:auto}
IE버전별 CSS 파일 호출 및 STYLE 코드에 적용 방법 1. CSS 파일을 가져올 때 2. STYLE 코드 안에서 적용 할때 /* 브라우저 모드 EDGE 이거나 IE8 이상인 경우 */ .selector { property:value; property:value; } /* IE 7 이하 */ .selector { property:value; *property:value; } /* IE 6 이하 */ .selector { property:value; _property:value; }
스타일을 이용한 문장 줄이기 한줄인 경우 아래와 같이 적용 .classname{ overflow : hidden; white-space: nowrap; text-overflow:ellipsis; -o-text-overflow:ellipsis; -ms-text-overflow:ellipsis; -moz-text-overflow:ellipsis } 여러줄인 경우 또는 wrap 된 경우 위와 같이 해선 안된다. CSS를 이용한 방법이 있지만 모든 웹브라우저에는 적용이 안된다 .classSec{ overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; /* 라인수 */ -webkit-box-orient: vert..
바코드 폰트, 웹폰트 @font-face{ font-family:C39TWttf; src:url(C39TW.TTF);} @font-face{ font-family:C39TWeot; src:url(C39TW.eot);} .bcode{font-family:C39TWttf,C39TWeot;} 사용예시 기본 : 바의 넓이 1px, 굵은바의 넓이 2px, 색상 검정 barcode(문자열, 바코드의 세로길이); // 필수 예시1 barcode(문자열, 바코드의 세로길이, 바의 넓이, 굵은바의 넓이); // 예시 2 barcode(문자열, 바코드의 세로길이, 바의 넓이, 굵은바의 넓이, 스페이스의 넓이, 굵은 스페이스의 넓이) // 예시 3 barcode(문자열, 바코드의 세로길이, 바의 넓이, 굵은바의 넓이, 스페..
htmlcode = "test"; var ptn = new RegExp("]*>","gi"); //혹은 아래 처럼 정규표현식 만듬 var ptn = /]*>/gi; htmlcode = htmlcode.replace(ptn,"");
/* * jQuery outerHTML * * Copyright (c) 2008 Ca-Phun Ung * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://yelotofu.com/labs/jquery/snippets/outerhtml/ * * outerHTML is based on the outerHTML work done by Brandon Aaron * But adds the ability to replace an element. */ (function($) { $.fn.outerHTML = function(s) { return (s) ? this.before(s).remove() ..