用css實現一個步驟指引條

來源:互聯網
上載者:User

標籤:

完成後顯示效是這樣的:

從左至右三幅圖片分別是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實現一個步驟指引條

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.