반응형
반응형
@ CSS Sprites 생성도구 : http://ko.spritegen.website-performance.org/
  : 이미지 압축파일 올려주면 자동으로 만들어준다. 고마운 도구이군.

Image Sprites : http://www.w3schools.com/css/css_image_sprites.asp

An image sprite is a collection of images put into a single image.
A web page with many images can take a long time to load and generates multiple server requests.
Using image sprites will reduce the number of server requests and save bandwidth
- 무슨 말이냐고? 하나의 이미지를 사용하는 이미지 모음을 얘기하는데,
  이를 사용하는 이점은 서버로의 호출을 줄이고 대역폭을 확보하는데 있다.
  이미지 모음을 CSS로 잘라서 사용하라는 말입니다.

예제 1 : http://www.w3schools.com/css/tryit.asp?filename=trycss_sprites_img
예제 2 : http://www.w3schools.com/css/tryit.asp?filename=trycss_sprites_nav
예제 3 : http://www.w3schools.com/css/tryit.asp?filename=trycss_sprites_hover_nav

반응형
반응형
iPad에서 Portrait & Landscape 일때 적용 CSS 예제
http://catharsis.tumblr.com/post/501657271/ipad-orientation-css-revised

iPad Orientation CSS (Revised)

It doesn’t take much foresight to anticipate that with the rise of Natural User Interfaces (NUIs) like the iPhone and iPad, UI designers will have a greater responsibility to optimize for orientation-based contexts. As such, it’s quite prescient that today, the folks at Cloud Four demonstrated how to serve up stylesheets based on device orientation.

Since I have a feeling I’ll be using this quite a bit in the future, I wanted to build on Cloud Four’s work and find a way to alleviate the following issues:

  1. Extra HTTP requests
  2. Not iPad-specific
  3. Lack of reusability

So, without further ado, here’s my proposed revision to the iPad orientation CSS:

<!-- css -->
@media only screen and (max-device-width: 1024px) and (orientation:portrait) { 
    .landscape { display: none; }
}
@media only screen and (max-device-width: 1024px) and (orientation:landscape) { 
    .portrait { display: none; }
}

<!-- example markup -->
<h1 class="portrait">Your device orientation is "portrait"<h1>
<h1 class="landscape">Your device orientation is "landscape"<h1>

As you can see, I’ve also changed the markup in a predictable way. An explanation of the changes and the reasoning behind them can be found below.

반응형

+ Recent posts