Snippet

자바스크립트에서 브라우저 속성 지원 여부 확인하기

자바스크립트에서 브라우저 속성 지원 여부 확인하기 DOM Attribute placeholder attribute is supported if('placeholder' in document.createElement('input')){ … } download attribute is supported if(typeof document.createElement('a').download != "undefined"){ … } img srcset attribute …

자바스크립트에서 브라우저 속성 지원 여부 확인하기 Read More »

javascript – 경고창에서 한글이 깨질경우

경고창에서 한글이 깨질경우 <html> <head> <meta http-equiv='Content-Type' content='text/html; charset=euc-kr' /> </head> <body> <script> window.alert('Hello World!\\n헬로우 월드!'); history.go(-1); </script> </body> </html>

CSS에서 수직 중앙 정렬하기

CSS에서 수직 중앙 정렬하기 테이블 속성 이용한 방법 .valign-parent {display:table;width:100%;height:100%;} .valign-child {display:table-cell;vertical-align:middle;} 포지션 속성 이용한 방법 .valign-parent { position: relative; width:100px;height:100px; } .valign-child { width: 50%; height: 50%; position: absolute; …

CSS에서 수직 중앙 정렬하기 Read More »

워드프레스에서 요약글을 글자수로 자르기

워드프레스에서 요약글을 글자수로 자르기 Usage custom_text_length_sub(get_the_title(), 80); custom_excerpt_length_sub(get_the_excerpt(), 80); Function iconv: function custom_text_length_sub($text_fun, $text_length) { $excerpt = $text_fun; $charlength = $text_length; if (iconv_strlen($excerpt) > $charlength) { $excerpt_more = apply_filters('excerpt_more', ''); …

워드프레스에서 요약글을 글자수로 자르기 Read More »

터미널에서 SSH 접속하기

터미널에서 SSH 접속하기 Usage sudo ssh -t <USERNAME>@<IP_ADDRESS> -p 22 -i "<KEY>" Example sudo ssh -t ubuntu@127.0.0.0 -p 22 -i "private.pem"

Scroll to Top