본문 바로가기

반응형

전체보기

(312)
cursor 의 종류 카테고리CSS 값예제설명일반링크와 상태선택드래그 앤 드롭크기 조절과 스크롤확대와 축소 auto 사용자 에이전트가 현재 맥락에 맞춰 표시할 커서를 결정. 예를 들어 글씨 위에서는 text를 사용합니다. default 플랫폼에 따라 다른 기본 커서. 보통 화살표입니다. none 커서 없음. context-menu 콘텍스트 메뉴 사용 가능. help 도움말 사용 가능. pointer 링크를 나타내는 포인터. 보통 한 쪽을 가리키는 손입니다. progress 프로그램이 백그라운드에서 작업 중이지만, 사용자가 인터페이스와 상호작용할 수 있음. (wait과 반대) wait 프로그램이 작업 중이고, 사용자가 인터페이스와 상호작용할 수 없음. (progress와 반대) 간혹 모래시계나 시계모양 그림을 사용합니다. ce..
validate JSON (JSON 여부 검사) const isJson = (str: string) => { try { const json = JSON.parse(str); return json && typeof json === 'object'; } catch (e) { return false; } };
get only text by clipboard Copy & Paste 시에 텍스트만 가져오도록 처리 onpaste 이벤트에 걸면된다. const getTextByPasteClipboard = (e) => { e.preventDefault(); let text; const clp = (e.originalEvent || e).clipboardData; if (clp === undefined || clp === null) { // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore text = window.clipboardData.getData('text') || ''; if (text !== '') { text = text.replace(/]*>/g, ''); if (windo..
get Image width and height const getImageSize = (file: File, callback: (width: number, height: number) => void) => { const reader = new FileReader(); reader.readAsDataURL(file); reader.onload = (e) => { const image = new Image(); image.src = e.target.result as string; image.onload = function () { // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore callback(this.width, this.height); }; }; }
Vertical scrolling in iOS not smooth div에 overflow를 사용해 scroll 를 만들었을때, ios 등에서 smooth scroll이 안될 경우. * { -webkit-overflow-scrolling: touch; } 위 코드 삽입. * 로 설정은 부담이 될 수 있으므로 해당 태그에만 적용시켜도 된다.
iphone X 웹뷰 safe-area-inset 관련 프로젝트에서 상단 하단 position:fixed된 레이아웃 상태에서 아이폰X 웹뷰 대응 방법이다. 메타태그 뷰포트쪽에 viewport-fit=cover 를 추가 padding-top: env(safe-area-inset-bottom); 2번의 속성값을 응용하는 건데 기본적으로 env(safe-area-inset-bottom); // IOS 11.0 이상 (신) constant(safe-area-inset-bottom); // IOS 11.0 버전 (구)ios 11.2 업데이트에서 constant가 제거됨 env를 사용. 해당 값이 필요한 부분에 위값을 응용하여 집어 넣었다. (저는 커스텀한곳에 위 env,constant 둘다 삽입 했습니다;) safe-area-inset의 기본값이 있어 값을 수정하고 ..
CSS overflow scrolling and hidden scrollbar (iOS) I just played with this CodePen and it seems that if you set the background-color to transparent for all three properties below (and in this example also remove box-shadows), the scrollbar is not visible at all: #style-1::-webkit-scrollbar-track { // -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.1); background-color: transparent; } #style-1::-webkit-scrollbar { background-color: transparent; } #..
신용카드와 연계된 고금리 적금, 주의할 점은? 저금리시대, 지금 시대를 이렇게 표현하고는 하는데 왠일인지 고금리 적금 상품들이 연일 쏟아져 나온다. 어찌된 일일까. 일단 지금 나오는 고금리 적금 상품은 크게 2가지로 나뉘는 것으로 보인다. 1. 이벤트성, 그러나 금액과 기간이 짧다. 입금가능 최대 금액이 20~30만원에 불과하고 기간도 6개월에서 12개월이 전부다. 핀크같이 24개월짜리도 나오긴 했으나 SKT 요금제 5만원이상 조건을 갖고있다. 이자가 5% 7% 라고 해도 이자수익이 5만원, 7만원에 불과하다. 하지만 알뜰한 사람들은 이 돈도 큰 돈이다. 1번의 경우 우대금리 조건을 따져 2%대 이상만 되어도 가입하는게 사실 이득이다. 예금금리가 1%도 안되는 0%대에 진입했기 때문에 예금 입출금계좌에 돈을 놀게 냅두는건 정말 상상조차 할 수 없는 ..

반응형