Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

4.09.2008

CSS Naked Day on Apr.9

CSS裸體日,在這天當中,所有參加此活動的網站都會脫下它們的華麗外衣,讓人們記得真正web的本質是什麼。
CSS Naked Day


4.06.2008

CSS Naked Day

This is the 3rd year of CSS Naked Day. You may go CSS Naked Day for more information. To promote Web Standards and demonstrate the HTML with semantic markups and well-formed (X)HTML, participant will turn off their CSS styles.

What do I do?
Since I can't write PHP in blogspot, then I wrote a JavaScript to disable all stylesheets. when the date is April 9th. Here's the example:

/* Put this in your HEAD tag */
function naked(){
if(timeNow.getDate()!=9 || timeNow.getMonth()!=3) return ;
for(var s=0;s<document.styleSheets.length;s++){
document.styleSheets[s].disabled = true;
}
}
naked();

Since there is an article said that Safari, Konqueror and ICEbrowser poorly support the styleSheets object. If you want to support Safari, you need to put this before </body> or in window onload event:
/* Put this before the end of BODY tag */
nake();


I have no idea why I can't access styleSheets object within HEAD tag in Safari. :(
Anyway, enjoy the CSS Naked Day!