你在找这样的东西吗?
CSS:
div.dd { /*position: relative; /* IE is dumb */ display: block; float: left; width: 500px; height: 16px; margin: 0 0 2px; background: #fff; } div.dd div.blue { /*position: relative; */ background: #00f; height: 16px; width: 75%; text-align:right; display:block; float: left; } div.dd div.red { /*position: relative; */ background: #f00; height: 16px; width: 75%; text-align:right; display:block; float: left; }
HTML:
我不确定你为什么要使用dd标签(对我来说,这个标签会导致div在dd标签下呈现,而不是在内部).
你在找这样的东西吗?
CSS:
div.dd { /*position: relative; /* IE is dumb */ display: block; float: left; width: 500px; height: 16px; margin: 0 0 2px; background: #fff; } div.dd div.blue { /*position: relative; */ background: #00f; height: 16px; width: 75%; text-align:right; display:block; float: left; } div.dd div.red { /*position: relative; */ background: #f00; height: 16px; width: 75%; text-align:right; display:block; float: left; }
HTML:
我不确定你为什么要使用dd标签(对我来说,这个标签会导致div在dd标签下呈现,而不是在内部).