纯CSS完成好看的往下拉导航栏实际效果编码

日期:2020-10-18 类型:科技新闻 

关键词:免费自助建站,手机建站平台,wap建站,免费自助建站平台,H5网站,H5模板建站

本文案例讲述了纯CSS完成好看的往下拉导航栏实际效果编码。共享给大伙儿供大伙儿参照。实际以下:

这是1款纯CSS进行的往下拉导航栏编码,蓝色經典色彩,十分空气,合适政府部门和公司类网站做为顶部的导航栏菜单,访问器适配性进行OK,有必须的盆友能够拿去。

运作实际效果截图以下:

线上演试详细地址以下:

http://demo.jb51.net/js/2015/css-xlcd-nav-menu-codes/

实际编码以下:


拷贝编码
编码以下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3c.org/TR/1999/REC-html401⑴9991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD id=Head1>
<TITLE>纯CSS往下拉菜单</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf⑻">
<style>
* {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
UL {
LIST-STYLE-TYPE: none
}
LI {
LIST-STYLE-TYPE: none
}
DL {
LIST-STYLE-TYPE: none
}
DD {
LIST-STYLE-TYPE: none
}
DT {
LIST-STYLE-TYPE: none
}
A {
COLOR: #414141; TEXT-DECORATION: none
}
IMG {
DISPLAY: inline-block; FONT-SIZE: 12px; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none
}
A:hover {
COLOR: #c51007
}
#dangqian A {
COLOR: #c51007
}
.clear {
CLEAR: both
}
.warper {
MARGIN: 0px auto; WIDTH: 1000px
}
.menu {
MARGIN-TOP: 3px; FONT-SIZE: 12px; BACKGROUND: url(images/menu_02.gif) repeat-x; LINE-HEIGHT: 28px; HEIGHT: 28px
}
.menu_01 {
FLOAT: left
}
.menu_02 {
FLOAT: right
}
.menu A {
FONT-WEIGHT: bold; COLOR: #fff
}
.menu A:hover {
COLOR: #b8def6
}
.menu DL {
FLOAT: left
}
.menu DD {
FLOAT: left; WIDTH: 132px; TEXT-ALIGN: center
}
.menu DT {
PADDING-LEFT: 1px; BACKGROUND: url(images/menu_04.gif) no-repeat left top; FLOAT: left; WIDTH: 122px; POSITION: relative; HEIGHT: 28px; TEXT-ALIGN: center
}
.menuli_div {
BACKGROUND: #0068aa; LEFT: 1px; PADDING-BOTTOM: 8px; WIDTH: 122px; POSITION: absolute; TOP: 28px
}
.menuli_div LI {
BACKGROUND: url(images/menu_05.gif) no-repeat center bottom; PADDING-BOTTOM: 1px; LINE-HEIGHT: 24px; HEIGHT: 24px
}
.menu DT UL LI A {
FONT-WEIGHT: normal
}
.menuli .menuli_div {
DISPLAY: none
}
.menuli_hover .menuli_div {
DISPLAY: block
}
</style>
<BODY onselectstart="return false">
<DIV class=warper>
<DIV class=menu><DL>
<DD><A href="#" target=_self>主页</A></DD>
<DT class=menuli onMouseOver="this.className='menuli_hover'"
onmouseout="this.className='menuli'"><A href="#"
target=_self>有关故乡网</A>
<UL class=menuli_div>
<LI><A href="#">About</A></LI>
<LI><A href="#">故乡网</A></LI>
<LI><A href="#">我国网</A></LI>
<LI><A href="#">大武汉</A></LI>
</UL></DT>
<DT class=menuli onMouseOver="this.className='menuli_hover'"
onmouseout="this.className='menuli'"><A href="#"
target=_self>资讯动态性</A>
<UL class=menuli_div>
<LI><A href="#">省内</A></LI>
<LI><A href="#">省外</A></LI>
</UL></DT>
<DT class=menuli onMouseOver="this.className='menuli_hover'"
onmouseout="this.className='menuli'"><A
href="#" target=_self>机构组织</A>
<UL class=menuli_div>
<LI><A href="#">省委</A></LI>
<LI><A href="#">政府部门</A></LI>
<LI><A href="#">政协</A></LI>
</UL></DT>
<DT class=menuli onMouseOver="this.className='menuli_hover'"
onmouseout="this.className='menuli'"><A
href="#" target=_self>主要经营的业务</A>
<UL class=menuli_div>
<LI><A href="#">淘宝</A></LI>
<LI><A href="#">手机上</A></LI>
<LI><A href="#">照相机</A></LI>
<LI><A href="#">电脑上</A></LI>
</UL></DT>
<DT class=menuli onMouseOver="this.className='menuli_hover'"
onmouseout="this.className='menuli'"><A href="#"
target=_self>品牌发展战略</A>
<UL class=menuli_div>
<LI><A href="#">1杯水</A></LI>
<LI><A href="#">大城市日常生活</A></LI>
<LI><A href="#">故乡网</A></LI>
</UL></DT>
<DT class=menuli onMouseOver="this.className='menuli_hover'"
onmouseout="this.className='menuli'"><A href="#"
target=_self>优秀人才招骋</A>
<UL class=menuli_div>
<LI><A href="#">我的家</A></LI>
<LI><A href="#">故乡网</A></LI>
</UL></DT>
<DT class=menuli onMouseOver="this.className='menuli_hover'"
onmouseout="this.className='menuli'"><A
href="#" target=_self>联络大家</A>
<UL class=menuli_div>
<LI><A href="#">联络我</A></LI>
<LI><A href="#">联络她</A></LI>
<LI><A href="#">我的家</A></LI>
</UL></DT></DL></DIV>
</BODY>
</HTML>

期待本文所述对大伙儿的div+css网页页面设计方案有一定的协助。