Javascript實現簡易導航欄
本文實例為大家分享了Javascript實現簡易導航欄的具體代碼,供大家參考,具體內容如下
<!DOCTYPE html><html lang='en'><head> <meta charset='UTF-8'> <meta name='viewport' content='width=device-width, initial-scale=1.0'> <meta http-equiv='X-UA-Compatible' content='ie=edge'> <title>導航</title></head><style>button{ width:80px; height:25px; border:none;} #b1{ background-image: url(’1.png’); margin-right:0px; } #b2{ background-image: url(’1.png’); width:380px; height:25px; text-align: left; } #b1:hover{ background-image: url(’2.png’); } #b2:hover{ background-image: url(’2.png’); }</style><body> <div style='width: 800px;margin:0px auto'><div> <img src='http://www.cgvv.com.cn/bcjs/1.jpg' height='150px%'> </div> <div> <div style='font-size: 1px'> <button type='button' id='b1'>網站首頁</button> <button type='button' id='b1'>網站新聞</button> <button type='button' id='b1'>網站趣聞</button> <button type='button' id='b1'>網站論壇</button> <button type='button' id='b1'>網站介紹</button> <button type='button' id='b2'>招納賢士</button></div> </div> </div></body></html>
效果圖:
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持好吧啦網。
相關文章: