2009-06-02 54 views
1

当Chrome或Firefox浏览这个页面上使用:如何部分扭转角色的颜色? (其33%的左边是黑色的,67%的右边是白色)

a page on dell.com

(或几乎任何产品页面应该工作)。有4个选项卡,如果我们点击最后一个选项卡进行“查看”,状态栏将会有部分反转的字符。例如,字母“v”可以有66%左边是白色,右边33%是黑色。我很确定这不是由Flash完成的,因为鼠标右键单击不显示任何Flash插件菜单。有人知道如何做到这一点吗?

截图:

alt text http://img192.imageshack.us/img192/2696/partlyreversed.png

+1

你提到戴尔页是如何*不*做一个很好的例子。男孩,什么是可怕的动画方式*几乎所有的*。 – Tomalak 2009-06-02 10:58:03

+0

@Tomalak你不觉得它如何让它像Windows窗口小部件一样工作吗? – 2009-06-02 11:11:04

回答

8

我想这个词居然有两次,一次在每种颜色,但是白色版本通过进度条裁剪。

2

样品:

<div style="width:400px; height:1.1em; position:relative;"> 
    <div style="position:absolute; text-align:center; width:400px; height:100%; background-color:#eee;">49 %</div> 
    <div style="position:absolute; overflow:hidden; width:195px; height:100%; background-color:#347;"> 
     <div style="width:400px; text-align: center; color: #ace;">49 %</div> 
    </div> 
</div>