春風博客

          春天里,百花香...

          導航

          <2008年5月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          統(tǒng)計

          公告

          MAIL: junglesong@gmail.com
          MSN: junglesong_5@hotmail.com

          Locations of visitors to this page

          常用鏈接

          留言簿(11)

          隨筆分類(224)

          隨筆檔案(126)

          個人軟件下載

          我的其它博客

          我的鄰居們

          最新隨筆

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          按鈕按下效果的左側導航欄實現(xiàn)

          在“http://neic.usgs.gov/neis/qed/”看到了一個不錯的按鈕按下效果的左側導航欄,自己模擬實現(xiàn)了一個,效果如下,目前在ie下效果可以,但FireFox下走形,以后再調吧:


          一。左菜單右內容的實現(xiàn)。
          本例中使用一個虛表格實現(xiàn)了左右兩列的效果,代碼如下:
          <body>
              
          <div id="bodyDiv">
                  
          <div id="header">
                      
          <jsp:include page="/web/page/branch/header.jsp"/>
                  
          </div>
                  
          <div id="content">
                      
          <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
                          
          <tr>
                              
          <td width="200" valign="top" bgcolor="#d4e4f0">
                                  
          <div id="leftMenu">
                                      
          <jsp:include page="/web/page/branch/menubar.jsp"/>
                                  
          </div>
                              
          </td>
                              
          <td>
                                  
          <div id="rightContent">
                                      內容。。。。
                                  
          </div>
                              
          </td>
                          
          </tr>
                      
          </table>
                  
          </div>
                  
          <div id="footer">
                      
          <jsp:include page="/web/page/branch/footer.jsp"/>
                  
          </div>
              
          </div>
          </body>

          二。CSS部分設置代碼。
          body{
              margin
          :2px;
              text-align
          :center;
              background
          :#7b869a;
          }


          #bodyDiv
          {
              margin
          :0 auto;
              text-align
          :left;
              background
          :#ffffff;
          }


          #header
          {
              height
          :100px;
          }


          #content
          {
              height
          :500px;
          }


          #rightContent
          {
              height
          :500px;
              padding
          :20px;
          }


          #leftMenu
          {
              height
          :500px;
              background
          :#d4e4f0;
              border-bottom
          :0px solid #000000;
              border-left
          :0px solid #000000;
              border-right
          :0px solid #000000;
              border-top
          :0px solid #bad5e8;
          }


          #footer
          {
              clear
          :both;
              background
          :#7b869a;
          }


          ul.pressEffectUl
          {    
              color
          : #000000; 
              margin
          :0px;    
              padding
          :0px;
              list-style-type
          :none;
              background
          :#d4e4f0;
          }


          ul.pressEffectUl a
          {
              padding-left
          :20px;
              text-decoration
          :none;
              color
          :#8d4f10;
              width
          :200px;
              border-left
          :0px solid #000000;
              border-right
          :0px solid #000000;
              border-top
          :1px solid #ffffff;
              border-bottom
          :1px solid #bad5e8;
          }


          ul.pressEffectUl a.currentLink
          {
              padding
          :2px;
              padding-left
          :20px;
              text-decoration
          :none;
              color
          :#000000;
              background
          :#ffffff;
              width
          :200px;
              border-left
          :0px solid #000000;
              border-right
          :0px solid #000000;
              border-top
          :1px solid #ffffff;
              border-bottom
          :0px solid #bad5e8;
          }


          ul.pressEffectUl a:hover
          {
              color
          :#000033;
              background
          :#e1effa;
              border-left
          :0px solid #000000;
              border-right
          :0px solid #000000;
              border-top
          :1px solid #e1effa;
              border-bottom
          :1px solid #e1effa;
          }


          h1 
          {
              font-size
          : 18px; 
              margin
          : 10px 0px 5px; 
              color
          : #eeeeee; 
              text-align
          : center;
          }


          h2 
          {
              font-size
          : 24px; 
              margin
          : 10px 0px 5px; 
              color
          : #000000; 
              text-align
          : center;
          }


          .feedbackShow
          {
          visibility
          : visible;
          }


          .feedbackHide
          {
          visibility
          : hidden;
          }

          三。代碼下載;
          http://www.aygfsteel.com/Files/sitinspring/PressButtonMenu20080523130024.rar 

          以上

          posted on 2008-05-23 13:16 sitinspring 閱讀(4391) 評論(0)  編輯  收藏 所屬分類: HTML,CSS&JSWeb開發(fā)

          sitinspring(http://www.aygfsteel.com)原創(chuàng),轉載請注明出處.
          主站蜘蛛池模板: 荔浦县| 邹城市| 黎平县| 县级市| 永宁县| 额敏县| 江阴市| 郁南县| 新竹市| 汉阴县| 桦南县| 宝丰县| 阳东县| 岑巩县| 志丹县| 剑河县| 施甸县| 道孚县| 汶川县| 淳安县| 杨浦区| 科技| 皮山县| 新津县| 隆安县| 鄂托克旗| 旬邑县| 鄂州市| 奈曼旗| 革吉县| 诸城市| 汉中市| 东光县| 罗江县| 岫岩| 呼和浩特市| 深州市| 太和县| 华容县| 元阳县| 阳泉市|