如何在css中设计风格:产品......(价格)?

One*_*ezy 10 html css

Hard for me to explain what I'm trying to achieve in a question. I've actually built it in a fiddle, but I know theirs got to be a smarter way of doing this: http://jsfiddle.net/4QgtM/1/



What I'm trying to achieve

Car ............................... $2000
Boat ............................. $20000
Airplane ........................ $200000



What I've got (Hack)

<ul>
<li><a href="javascript:void(0)">Car</a><i></i><span>$2000</span></li>
<li><a href="javascript:void(0)">Boat</a><i></i><span>$20000</span></li>
<li><a href="javascript:void(0)">Airplane</a><i></i><span>$200000</span></li>
Run Code Online (Sandbox Code Playgroud)

Does anyone have a smart way of achieving this? thanks!

Ser*_*gio 6

看看这个......(灵感来自于此)

小提琴

CSS:

ul.leaders {
    max-width: 40em;
    padding: 0;
    overflow-x: hidden;
    list-style: none
}
ul.leaders li:before {
    float: left;
    width: 0;
    white-space: nowrap;
    content:". . . . . . . . . . . . . . . . . . . . "". . . . . . . . . . . . . . . . . . . . "". . . . . . . . . . . . . . . . . . . . "". . . . . . . . . . . . . . . . . . . . "
}
ul.leaders span:first-child {
    padding-right: 0.33em;
    background: white
}
ul.leaders span + span {
    float: right;
    padding-left: 0.33em;
    background: white
}
Run Code Online (Sandbox Code Playgroud)

HTML:

<ul class=leaders>
    <li><span><a href="javascript:void(0)">Car</a></span>
    <span>$200</span>

    <li><span><a href="javascript:void(0)">Boat</a></span>
    <span>$2000</span>

    <li><span><a href="javascript:void(0)">Airplane</a></span>
    <span>$20000</span>

    <li><span><a href="javascript:void(0)">Hover craft</a></span>
    <span>$200000</span>

    <li><span><a href="javascript:void(0)">Supersonic futuristic machine</a></span>
    <span>$2000000</span>
</ul>
Run Code Online (Sandbox Code Playgroud)

"仅供记录":
- 另一个解决方案是在img/png中有一个小点作为背景.(background: #FFF url(image.pn) repeat-x;
- 还有一个解决方案border-bottom: dotted;