adobe dreamweaver
新建html文档。
准备好需要用到的图标。
书写hmtl代码。
书写css代码。*{ margin: 0; padding: 0; border: 0; }ul, ol, li { list-style: none; }input, button { margin: 0; font-size: 12px; vertical-align: middle; }body { font-size: 12px; font-family: Arial, Helvetica, sans-serif; text-align: center; margin: 0 auto; }table { border-collapse: collapse; border-spacing: 0; }b, em, i { font-style: normal; font-weight: normal; }h1, h2, h3 { font-size: 14px; }h4 { font-weight: normal; font-size: 14px; }h5 { font-size: 12px; }h6 { font-size: 12px; font-weight: normal; }img { display: block; }.pcenter { text-align: center; overflow: hidden; }.pcenter img { margin: 0 auto; }a { text-decoration: none; }a:hover { color: #f00; }.box- { position: relative; text-align: left; z-index: 1000; padding-top: 3px; width: 103px; margin: 20px auto; }#NewsLetter2 { DISPLAY: none; PADDING-LEFT: 5px; background: #333; LEFT: 0px; WIDTH: 215px; PADDING-TOP: 5px; POSITION: absolute; TOP: 13px; HEIGHT: 155px; overflow: hidden; }.box- li { height: 24px; width: 100%; line-height: 24px; float: left; }.box- li a { padding-left: 10px; color: #fff; background: url(../images/News_ico.gif) no-repeat 0 4px; }#NewsLetter2 li a { display: block; width: 200px; white-space: nowrap; text-overflow: ellipsis; -o-text-overflow: ellipsis; background: url(../images/News_ico.gif) no-repeat 0 9px; overflow: hidden; }.fbox { PADDING-RIGHT: 5px; PADDING-LEFT: 5px; overflow: hidden; width: 93px; BACKGROUND: #4e4d4d; PADDING-BOTTOM: 0px; HEIGHT: 155px }
书写并添加js代码。var the_timeout;function ShowNewsLetter(Display){ if (Display){ document.getElementById('NewsLetter2').style.display='block'; clearInterval(the_timeout); }else{ document.getElementById('NewsLetter2').style.display='none'; }}function HideNewsLetter(){ the_timeout = setTimeout('ShowNewsLetter(false);', 100);}function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i
代码整体结构。