ホームページ  >  記事  >  ウェブフロントエンド  >  ie6 ie7 ie8 ff互換の固定の書き方?_html/css_WEB-ITnose

ie6 ie7 ie8 ff互換の固定の書き方?_html/css_WEB-ITnose

WBOY
WBOYオリジナル
2016-06-24 12:26:25820ブラウズ

ie6 ie7 ie8ff の修正方法を記述するには?


ディスカッションに返信 (解決策)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gbk" /><title>IE6 position:fixed</title><style type="text/css">* { margin:0; padding:0;}#content{ height:2000px; }#a{ position:fixed; bottom:0; right:0; width:200px; height:60px; background:#F00;}/*IE6 fixed bug*/* html{overflow:hidden;}* html body{height:100%;overflow:auto;}* html #a{position:absolute;right:18px;}</style></head><body><div id="content">IE6 position:fixed</div><div id="a">IE6 position:fixed</div></body></html>




または

<!DOCTYPE HTML><html>	<head>		<meta charset="gb2312" />		<title></title>		<style>			body {				height:1200px;			}			.floatDIV {				width:100px; height:100px;				background:#ddd;								top:100px; right:10px;								/* not ie6 */				position:fixed;								/* ie6 */				_position:absolute;				_top:expression(documentElement.scrollTop + 100);			}			html {				_background:url(about:blank); /* 阻止闪动 in IE6,把空文件换成about:blank,减少请求 */			}		</style>			</head>	<body>		<div class="floatDIV">			123		</div>	</body></html>

IE6/IE7/IE8/IE9/Firefox/Chrome /Safari/O と互換性ありプレアブラウザFloating coderreee

http://www.9958.pw/post/css_position_fixed 個人テストに合格しました

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。