글

[HTML] ie7 first-child 주석 버그

<style type="text/css"> div ul.listNum li: first-child {color:red;font-weight:bold;} </style> <div> <ul class="listNum"> <!-- 주석 --> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ul> </div> 위 코드 작성시 별다른 문제가 없이 첫번째 li의 폰트에 css가 적용이 될것 이다. 다만 ie7에서 주석으로 인해서 first-child가 적용이 안될 경우가 생긴다. 신기했음...

[JS]도메인 체크

// 곧바로 현재 페이지 주소 출력 document.writeln(location.href); // 변수에 넣어서 출력 var s = location.href; document.writeln(s); // 도메인 document.location.href.match(/http[s]*:\/\/([a-zA-Z0-9\-\.]*)/)[1] var link =  document.location.href; console.log(link); // 파라미터 var para = document.location.href.split("?"); console.log(para); //ex $(window).load(function(){ var url =  document.location.href; if(url.indexOf('#')!=-1){ var urlSplit = url.split('#'), para = '.' +urlSplit[1].split('=')[1], listLink = $('ul.tab-js > li > a'+para); listLink.trigger("click"); } });

[jQuery] 금액단위 제거 표기

구글신에겐 역시 없는게 없다... http://jsfiddle.net/praveenscience/R8JrF/1/ <table id="price"> <tr> <td class="price_01">700,000</td> <td>5,000</td> <td class="price_rs"></td> </tr> <tr> <td class="price_01">600,000</td> <td>3,000</td> <td class="price_rs"></td> </tr> <tr> <td class="price_01">500,000</td> <td>7,000</td> <td class="price_rs"></td> </tr> </table> <script type="text/javascript"> $(".price_01").each(function(){ var price_01 = $(this).html().replace(/,/g, ""); var price_02 = $(this).next().html().replace(/,/g, ""); var price = (price_01-price_02).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") var price_rs = $(this).next().next(".price_rs"...

페럴렉스 레이아웃 예제

이미지
복잡하게 만들려면 한없이 복잡하고 간단하게 만들려고 하면 간단한 머리 아픈 페럴렉스 레이아웃 중에 간편하게 소스를 제공하거나 분석해서 사용하기 편한 것들을 모아 보았음. 너무 많아서 앞으로 계속 업데이트를 해야 할듯... 재미있거나 화려한 효과를 가진 녀석들은 따로 분류를 해야 겠음. 1.  A Simple Parallax Scrolling Technique http://code.tutsplus.com/tutorials/simple-parallax-scrolling-technique--net-27641 2.  Create a Parallax Scrolling Website Using Stellar.js http://webdesign.tutsplus.com/tutorials/create-a-parallax-scrolling-website-using-stellarjs--webdesign-7307 3. fullPage.js http://alvarotrigo.com/fullPage/ 4.  HTML5 × CSS3 × jQueryを真面目に勉強 – #6 パララックスエフェクトの基本 http://dev.classmethod.jp/etc/html5-x-css3-x-jquery-6-parallax/ 5.  How to create a parallax scrolling website https://ihatetomatoes.net/how-to-create-a-parallax-scrolling-website/ 6.  parallax scrolling for the masses http://prinzhorn.github.io/skrollr/ 7. jQuery Scrolldeck Parallax Plugin http://ianlunn.co.uk/articles/recreate-nikebetterworld-parallax/ ...

[CSS] 스킵네비게이션

1. 스킵네비게이션은 <body>다음으로 나오는 것이 가장 적절합니다. 2. 본문으로 가는 기능만 제공하고 다른 건너띄기 컨텐츠에 대한 건너띄기는 제공하지 않도록 합니다. 3. 아래 코드는 일반적으로 사용하는 스킵네비를 약간 수정한 것입니다.(개취) 4. 크롬을 위한 tabindex를 추가 하였습니다. <style type="text/css"> /* Skip Nav */ #skipNav{position:relative;z-index:9999;} #skipNav a{display:block; height:1px; width:1px; margin-bottom:-1px; overflow:hidden; font-size:20px; color:#fff; font-weight:bold; background:#2466a6; white-space:nowrap;text-align:center;} #skipNav a:focus, #skipNav a:active{height:auto; width:100%; padding:5px; margin-bottom:10px; position:absolute; left:0; top:0;} </style> </head> <body> <div id="skipNav"><a href="#contents">Skip to the menu / 본문가기</a></div> <ul> <li><a href="#">매뉴1</a></li> <li><a href="#">매뉴2</a></li> <li><a href="#">매뉴3</a></li> </ul> <div id=...

[반응형] 다음 트로이

이미지
반응형 웹을 만들기 위해 미리보기를 지원해주던 다음의 트로이가 기능을 업데이트 하였습니다. 기존에 없었던 최신 스마트기기들이 추가된 것과 한번에 여러가지 기기를 동시에 볼수 있는 멀티스크린 모드가 생겼습니다! 멀티 스크린 모드기능은 다른 미리보기 사이트들은 아마 없을듯 합니다. 아마도... 주로 크롬 디버깅 모드에서 제공하는 에뮬레이터모드에서 작업하기는 하지만 타 파트와 의사소통할 때 트로이로 진행을 한적이 좀 있는데 다들 의외로 모르는 분들이 많더라구요. 이젠 텝과 새로고침 하면서 보여주는게 아니라 한꺼번에 쫘~보여줄 수 있으니 좀더 편해지겠군요~ http://troy.labs.daum.net/
1 http://www.wah.or.kr/RIA/Js/example/tab_menu2/tab-menu_2.html 2 http://hsbyun9898.iptime.org/js/tab-menu3/html/ 3 http://demo.hongkiat.com/css3-calc-function/