Home > Firefox > Firefox 1.5 で URL やドメイン毎に CSS を適用する

Firefox 1.5 で URL やドメイン毎に CSS を適用する

Firefox 1.5 からは URI id などの拡張機能をインストールしなくても、URL やドメイン毎に CSS を適用できる様になりました。CSS の書き方は次の様になります。

/* http://www.example.com/ に適用 */
@-moz-document domain(www.example.com) {
  body { font-size: 100% !important; }
}

/* http://www.example.com/~example/ で始まる URL に適用 */
@-moz-document url-prefix(http://www.example.com/~example/) {
  body { font-size: 100% !important; }
}

ちなみに @-moz-document url() は、URL の完全一致で CSS を適用するらしい。

関連する記事

Comments: 0

Comment Form
Remember personal info

Trackback+Pingback: 0

TrackBack URL for this entry
http://bowz.info/428/trackback
Listed below are links to weblogs that reference
Firefox 1.5 で URL やドメイン毎に CSS を適用する from Bowz::Notebook

Home > Firefox > Firefox 1.5 で URL やドメイン毎に CSS を適用する

タグクラウド

Return to page top