日期:2014-05-17  浏览次数:20624 次

请教如何在滚动条上显示进度文字
如下所示:
  『-----80%-----』
这里的百分比例直接显示在滚动条上,而且实时反映滚动条的当前长度

------解决方案--------------------
恐怕只有自己模拟个滚动条吧!
------解决方案--------------------
<style type= "text/css ">
.jdtiao{font-size:12px; position:relative; height:15px; line-height:15px; width:100%; background:#ccc; width:100px; border:1px solid #00f}
.tiao{background:#f60; height:15px;}
.bfb{position:absolute; width:100%; color:#fff; font-weight:bold; text-align:center}

</style>
<div class= "jdtiao "> <div class= "bfb "> 80% </div> <div style= "width:80%; " class= "tiao "> </div> </div>

实时的就要用JS和后台程序交互了