码迷,mamicode.com
首页 > Web开发 > 详细

用css实现一个步骤指引条

时间:2015-02-16 00:24:25      阅读:380      评论:0      收藏:0      [点我收藏+]

标签:

完成后显示效是这样的:

技术分享

从左到右三幅图片分别是1.png,3.png,2.png。技术分享技术分享技术分享

 1 <!DOCTYPE html>
 2 <html>
 3     <head>
 4         <title>mytest</title>
 5         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 6         <style>
 7             div{width: 1000px;margin: 0px auto;}
 8             div ul{
 9                 line-height:50px;
10                 text-align:center;
11                 width:1000px;
12             }
13             div ul li {
14                 width:170px;
15                 display:block;
16                 float:left;
17                 background:url(2.png) no-repeat;
18                 padding-right: 30px;
19                 background-position:right;
20                 background-color: #ffe6ba;
21             }
22             div ul .on_pre {
23                 background:url(1.png) no-repeat;
24                 background-position:right;
25                 background-color: #ffe6ba;
26             }
27             div ul .last {
28                 background:url(3.png) no-repeat;
29                 background-position:right;
30                 background-color: #ffe6ba;
31             }
32             div ul .on {
33                 background-color:#f60;
34             }
35         </style>
36     </head>
37     <body>
38         <div>
39             <ul>
40                 <li class="on_pre"><span>桃子</span></li>
41                 <li class="on"><span>香蕉</span></li>
42                 <li><span>橘子</span></li>
43                 <li><span>西瓜</span></li>
44                 <li class="last"><span>苹果</span></li>
45             </ul>
46         </div>
47     </body>
48 </html>

第一篇技术博文出炉了,你离成为大师不远了。

用css实现一个步骤指引条

标签:

原文地址:http://www.cnblogs.com/mao-mao/p/4293610.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!