【发布时间】:2012-06-27 12:04:20
【问题描述】:
如何在用户查看页面一段时间后从浏览器窗口顶部下拉到下拉条?说 5 秒。然后,此栏将向下推动页面上的所有内容,直到栏完成出现。该栏将用于显示单行文本,通知用户某事。也许在栏的右侧有一个小 X 来关闭它。
目前这是 CSS:
#infobar {
border-bottom: 5px solid;
height: 25px;
position: fixed;
width: 100%;
border-bottom-color: #F00;
background-color: #9C9;
margin-top:-16px;
}
#infobar .text {
color: #FFFFFF;
float: left;
font-family: arial;
font-size: 12px;
padding: 5px 0;
position: relative;
text-align: center;
width: 100%;
}
#infobar .text a {
color: #FAFAFA;
}
#infobar .text a:hover {
color: #FFE2A0;
}
</style>
还有 HTML:
<div id="infobar">
<div class="text">
....this is the bar text....
</div>
</div>
【问题讨论】:
-
您需要 Javascript/JQuery 来执行此操作,仅使用 HTML/CSS 是不可能的
标签: javascript jquery html css drop-down-menu