【広告】Amazonにて人気の 日替わり商品毎日お得なタイムセール

H:Home > Read Me First > Profile > Diary
i-mode / J-SKY / EZweb(の一部) 対応の簡易版
検索文字列:

脱 三日坊主 宣言!

このサイトの管理人、表具師かっぱの日記です。
(新規投稿は出来ませんが、ツッコミは入れられます)

別冊 表具師かっぱの「脱 三日坊主 宣言!」もちまちま更新中

※ 当日記はレイアウトに CSS2 を使用しています ※
(CSS2 未対応のブラウザでも閲覧・投稿は可能です)
なお、IE3NN4CSS への対応が不完全ですので、設定にかかわらず適用されないようにしています。ご了承下さい。

ホームページへ戻る


こちらの記事へツッコミを入れる場合は下のフォームに書いて下さい。
内容が異なる場合はブラウザのバックボタンで戻って下さい。


2004-03-18 の出来事

IE7

brogue 経由で IE7 というパッチプログラムを知りました。

これは CSS2 の実装が貧弱な IE5.5 以上に対して CSS2 を正しく解釈させる為に DHTML で書かれたパッチプログラムで、3つのファイルで構成されています。

使い方は簡単で、「ie7-html.css」「ie7-style.htc」「ie7.htc」の3つのファイルを用意し、HTMLHEAD 要素内で最初に読み込むスタイルシートとして以下の「ie7-html.css」を指定する為に <link rel="stylesheet" href="ie7-html.css" type="text/css"> の1行を追加します。

ie7{/*
    Author:  Dean Edwards/2004
    Web:     http://dean.edwards.name/
*/}

/* W3C compliance for Microsoft Internet Explorer */
@namespace html url(http://www.w3.org/1999/xhtml);

STYLE {
    behavior: url(ie7-style.htc);
}

BODY {
    behavior: url(ie7.htc);
    /* initially hide the document to eliminate screen flicker (optional) */
    display: none;
}

.ie7_ABBR {
    /* implement the dotted underline effect */
    background: url(javascript:document.DOTS) repeat-x bottom left;
}

/* for compliant browsers */
html>body {
    display: block;
}

上記の CSS を見て頂ければ判るように、IE5 以上の独自拡張プロパティである behavior プロパティで、「ie7-html.css」から「ie7-style.htc」と「ie7.htc」を呼び出していますから、あとは IE での実装を気にする事無く、仕様に準拠した CSS を書くだけです。(behavior: url(); のファイルパスを書き換える必要があります)

残り2つの .htc ファイルの内、「ie7.htc」は dean.edwards.name/IE7/src/ で随時更新されて行くようですが、「ie7-style.htc」はおそらく変更は無いと思いますので以下に転載しておきますね。

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
    Author:  Dean Edwards/2004
    Web:     http://dean.edwards.name/
-->
<!-- 0.1 -->
<public:component xmlns:public="urn:HTMLComponent" lightweight="true">
<script type="text/javascript">
//<![CDATA[ // preserve xml

// this behavior should only be attached to html style tags
//  it simply preserves an unparsed style sheet.

// fix for IE5.x
if (!element.ownerDocument) element.ownerDocument = element.document;

// make sure this is not a style sheet created by ie7
if (innerHTML.replace(/^\s*/, "").slice(0, 3) != "ie7") {
    // save the original text in the style sheet (before it has been
    //  parsed by explorer) we'll process this later
    if (!ownerDocument.ie7StyleSheets) ownerDocument.ie7StyleSheets = [];
    ownerDocument.ie7StyleSheets[ownerDocument.styleSheets.length - 1] = innerHTML;
}
//]]>
</script>
</public:component>
<!-- http://dean.edwards.name/ -->

なお、IE7Creative Commons License ですから作者名サイトアドレスを明記するのを忘れないで下さいね。

まだα版ですのでサイト上で使うのは早い気がしますが、ローカルでテストしてみて、将来的には採用しようと考えています。

2004-03-18 の出来事にツッコミを入れる


本日のツッコミ





ツッコミ投稿フォーム


Number
Pass

ThinkPadを買おう!
レンタカーの回送ドライバー
【広告】Amazonにて人気の 日替わり商品毎日お得なタイムセール
無料で掲示板を作ろう   情報の外部送信について
このページを通報する 管理人へ連絡
SYSTEM BY せっかく掲示板