본문 바로가기

반응형

웹프로그래밍

(125)
Eclipse 에서 Dynamic Web Project, context root 를 / 로 변경 - Project Explorer 뷰 - Project 선택 - Properties - Web Project Settings - Context root 를 / 로 변경 - 메뉴 - Project - Clean - Servers 뷰에서 tomcat 선택, + 펼침, 해당 프로젝트 선택 후 삭제 - Servers 뷰에서 tomcat 선택 - 마우스 우클릭, Clean - Servers 뷰에서 tomcat 선택 - 마우스 우클릭, Add and Remove - 해당 프로젝트 선택후 Add
Javascript iBook EPUB 3.0 Images not working iBook 에서 이미지를 클릭 했을때 동적으로 div를 생성하고 그 안에 background-image 스타일 지정을 해주었으나 도통 빈 칸만 뜨고 이미지가 출력되지 않았다. 콘솔로그를 찍어볼 수 없는 거지같은 테스트환경이어서 html 마크업으로 일일히 확인해본 결과 이미지를 불러올때 ibooksimg:// 라는 프로토콜을 사용해야 하지만 ibooks:// 로 불러오면서 이미지가 출력되지 않은 것이었다. var str = $("img").get(0).src; str = str.replace("ibooks://", "ibooksimg://"); 로 간단히 replace 치환처리 하니 정상 출력되었다.
jQuery $("img").load non-cache 이미지의 원본 크기를 구하기 위해서 $("img").get(0).naturalWidth 이나 naturalHeight 를 변수에 초기화했을때, 0 값이 떨어진다. 이러한 현상을 막기 위해서 $("img").load(function(){ var img = { width:$(this).get(0).naturalWidth, height:$(this).get(0).naturalHeight }); 등으로 사용할 수 있다. 그런데 여기서 load 된 값이 캐슁처리되면서 더이상 load가 실행되지 않는다. 이때 아래와 같은 방법으로 대응가능하다. $("img").one("load",function(){ var img = { width:$(this).get(0).naturalWidth, height:$(this).ge..
background-size cover only Y ? .foo { background-size: auto 100%; }
jQuery Animation Rotate $({deg: 0}).animate({deg: d},{ duration: cf.duration, step: function(now) { ev.css({ transform: 'rotate(' + now + 'deg)' }); } });
CSS3 for IE7, 8 {https://github.com/scottjehl/Respond/} css3-mediaquery 보다 훨씬 빠르고 잘된다. Respond.js A fast & lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more) Copyright 2011: Scott Jehl, scottjehl.com Licensed under the MIT license. The goal of this script is to provide a fast and lightweight (3kb minified / 1kb gzipped) script to enable responsive web designs in browsers that don't support CSS3 Media Queries - in particu..
Background-size for IE7,8 https://github.com/louisremi/background-size-polyfill for IE8 that is really simple to use: .selector { background-size: cover; behavior: url(/backgroundsize.min.htc); }
CSS3 구조선택자 구조선택자는 CSS3에서 추가된 기능이므로 IE8 이하에서는 사용할 수 없다. 1. 일반 구조 선택자 선택자 형태 설명 :first-child 첫번째에 위치하는 자손을 선택 :last-child 마지막에 위치하는 자손을 선택 :nth-child(수열) 앞에서 수열 번째에 있는 자손을 선택 ex) nth-child(2n) , nth-child(2n+1) :nth-last-child(수열) 뒤에서 수열 번째에 있는 자손을 선택 first second third fourth fifth sixth seventh 2. 형태 구조 선택자 선택자 형태 설명 :first-of-type 자손 중에 첫번째로 등장하는 특정태그 :last-of-type 자손 중에 마지막으로 등장하는 특정태그 :nth-of-type(수열) 자..

반응형