
HTMLやらCSSやらJavaScriptやら色々弄った感想
- Firefox, Safari, Google Chrome なんかは割と手がかからない
- Opera も上の3つ抑えてればだいたいok
- なんかSafari4のJavaScriptの挙動が3と微妙にちがう
- IEは死ね、IE7からだいぶ互換性的な物がよくなってるけどIEは死ね。
-- IE6のサポートを切り捨てる時代はまだか?
- IE8は確かにJavaScriptが速くなってるがGoogle Chromeは劣るしSafariとか本当速い、Firefox3.0は結構遅い
- z-indexの事を考えてないで作ってると、いざとなったら本当にびっくりする
- pngの透過画像をあわせるのは案外しんどい
-- DXImageTransform.Microsoft.AlphaImageLoader使うんだけど、background-imageが入ってると混ざる、そしてDXImageTransform.Microsoft.AlphaImageLoaderで出すと画像が背景画像じゃなくなる
-- classにpngimgみたいなのが入ってるときはbackgroundをnoneにするのやってみたけど、#idname:hover {} みたいに hover されたときだけpng画像を変えたりとかenable/disableクラス与え状態によってpng画像のurlを変えたりすると上手くDXImageTransform.Microsoft.AlphaImageLoaderが当たんなくなる
- 元から配布されてるjqueryライブラリを俺俺改造されてると他の人が困るので、元のは弄らずに外部からわかり易くmethod差し替えたりするとよい。
- アンダースコアハックとかCSSの人がハックハック言ってる物はPHPのクラス名の区切りにバックスラッシュ使うようなもんだと思ってるから使いたく無い
-- ブラウザ毎のCSSを吐き出すジェネレータ書いてHTMLから読む時にブラウザによって変えるのが正解なんだろなー
- float: leftしまくった要素を持つ親要素の縦横も、IEだけは float: left してる要素分だけ加算されるので、上のブラウザと全然違う事になったからjavascriptで縦横辻褄合わせた。
-- たいていの非互換製はJavaScript使う力技でなんとかなったり
- IE6なんかはpadding-leftの値を1px変えるだけですっきりしたり
IEを使わないでJavaScriptを書く時に陥る一番の罠としてはハッシュの最後の要素に,を付けてしまうという事(Perlでは皆よくやってる)だが
var hash = {
key: name,
last: value, // ここの ,
};#!/usr/bin/perlこんなのを書いてもらって使ってる。
use strict;
use warnings;
use Test::More;
use Text::SimpleTable;
plan skip_all => 'this test requires "jsl" command' unless `jsl` =~ /JavaScript Lint/;my @files = <htdocs/js/*.js>;
plan tests => 1*@files;my $table = Text::SimpleTable->new(25, 5, 5);
for my $file (@files) {
# 0 error(s), 6 warning(s)
my $out = `jsl -stdin < $file`;
if ($out =~ /((\d+) error\(s\), (\d+) warning\(s\))/) {
my ($msg, $err, $warn) = ($1, $2, $3);
$file =~ s!htdocs/js/!!;
$table->row($file, $err, $warn);
is $err, 0, $file;
} else {
ok 0;
}
}
diag $table->draw;
これ使ってると、「ああ、JavaScriptのスコープってfunction毎なんだな」ってのが良く思い出せて良いです。
(はてなに書こうとしてたフォーマットをそのままコピペしたのでみにくいかなっと)
ugg, cheap ugg boot for sell.wow gold, wow gold on line store.压力表, Pressure Gauge cheap ugg boot, ugg cardy, ugg cardy for uk, cheap ugg cardy boots are popular,we sell real ugg boots, cheap ugg boots, ugg cardy, cheap ugg cardy boots,ugg boots uk at great prices to people, we are proud to offer you the high quality and low price ugg classic cardy,ugg classic cardy shop, cardy ugg boots, cheap cardy ugg boots, ugg classic cardy boots, ugg classic cardy boots online, and ugg classic tall, ugg classic tall boot, ugg boots uk, cardy ugg boots are using 100% natural sheepskinugg boots, good ugg boots cheap ugg boots, that means yucan buy ugg boot, プライバシーマーク
As the Leader in china wholesale, Tradetang offer the best wholesale products , New products and Cheap Products. You can find Input Devices ,Laptop Parts Accessories ,Laptops, Notebooks ,Monitors Projectors and Networking. Well begun is the half done. Please choose our platform as you search the products to shorten your way to the success and we believe tradetang is your one-stop solution to purchasing China wholesale products online.