* { padding:0; margin:0; } .d_box { position:relative; box-sizing:border-box; height:3px; width:220px; background:#ccc; top:50%; margin-top:-1.5px; } .d_box.box3 { width:120px; } .d_bg { background:red; width:0; height:100%; } .d_cir { width:18px; height:18px; border:1px solid #ddd; background:#eee; cursor:pointer; position:absolute; border-radius:50%; top:-10px; left:0; } .d_cont { height:40px; } .wid-200 { width:200px; margin:0 auto; } .wid-250 { width:250px; margin:0 auto; } .wid-300 { width:300px; margin:0 auto; } .wid-400 { width:400px; margin:0 auto; } .toast { width:auto; height:auto; position:absolute; background:#373c42; color:#fff; font-size:13px; border-radius:5px; padding:3px 6px; z-index:100; font-family:'microsoft yahei','Arial Narrow',Arial,sans-serif; } .triangle { position:absolute; left:50%; border:4px solid transparent; border-top-color:#373c42; bottom:-8px; margin-left:-4px; } .hide { display:none; }
兼容到火狐,ie8
el 值为绑定的元素,和css选择器相同
max 为最大显示值
目前只加了toast显示,后续会增加显示方式