您的位置:
首页
>>
教程中心
>>
网页教程
>>
HTML/CSS教程
>> 正文
∷
教程正文
∷
CSS模仿IE警告信息栏
来源:
中国素材网
添加时间:2006-10-18 9:11:46 浏览数:
把如下代码复制到<body></body>之间
<div id="infobar" align=center><a rel="nofollow" href="index.htm">CSS模仿IE警告信息栏-点击查看此特效源代码</a></div>
把如下代码复制到<head></head>之间
<style type="text/css"> body { margin: 0 !important; padding: 0 !important; } /* A fake IE information bar */ #infobar { font: message-box; } /* Please adjust the values if the infobar is not looking good */ #infobar a, #infobar a:link, #infobar a:visited, #infobar a:active { display: block; float: left; clear: both; width: 100%; color: InfoText; background: InfoBackground no-repeat fixed .3em .3em; padding: .60em .3em .40em 2em; border-bottom: .16em outset; text-decoration: none; cursor: default; } #infobar a:hover { color: HighlightText; background: Highlight no-repeat fixed .3em .3em; } /* A fake viewplot for IE information bar */ #viewplot { width: 100%; height: expression(this.parentNode.offsetHeight - this.offsetTop); overflow-x: hidden; overflow-y: scroll; padding: 1em; /* Please set this to the value as that of your <body> */ } </style>
作者:021123.com